Interface CartUpdate

All Superinterfaces:
ResourceUpdate<CartUpdate,CartUpdateAction,CartUpdateBuilder>

public interface CartUpdate extends ResourceUpdate<CartUpdate,CartUpdateAction,CartUpdateBuilder>
CartUpdate
Example to create an instance using the builder pattern

     CartUpdate cartUpdate = CartUpdate.builder()
             .version(0.3)
             .plusActions(actionsBuilder -> actionsBuilder)
             .build()
 
  • Method Details

    • getVersion

      @NotNull @NotNull Long getVersion()

      Expected version of the Cart on which the changes apply. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

      Specified by:
      getVersion in interface ResourceUpdate<CartUpdate,CartUpdateAction,CartUpdateBuilder>
      Returns:
      version
    • getActions

      @NotNull @Valid @NotNull @Valid List<CartUpdateAction> getActions()

      Update actions to be performed on the Cart.

      Specified by:
      getActions in interface ResourceUpdate<CartUpdate,CartUpdateAction,CartUpdateBuilder>
      Returns:
      actions
    • setVersion

      void setVersion(Long version)

      Expected version of the Cart on which the changes apply. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

      Specified by:
      setVersion in interface ResourceUpdate<CartUpdate,CartUpdateAction,CartUpdateBuilder>
      Parameters:
      version - value to be set
    • setActions

      void setActions(CartUpdateAction... actions)

      Update actions to be performed on the Cart.

      Parameters:
      actions - values to be set
    • setActions

      void setActions(List<CartUpdateAction> actions)

      Update actions to be performed on the Cart.

      Specified by:
      setActions in interface ResourceUpdate<CartUpdate,CartUpdateAction,CartUpdateBuilder>
      Parameters:
      actions - values to be set
    • of

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

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

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

      static CartUpdateBuilder builder()
      builder factory method for CartUpdate
      Returns:
      builder
    • builder

      static CartUpdateBuilder builder(CartUpdate template)
      create builder for CartUpdate instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCartUpdate

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