Interface RelativeAllocationDraft

All Superinterfaces:
AllocationDraft, Draft<RelativeAllocationDraft>

public interface RelativeAllocationDraft extends AllocationDraft, Draft<RelativeAllocationDraft>

Allocates a percentage of the Order total to a Payment Method.


Example to create an instance using the builder pattern

     RelativeAllocationDraft relativeAllocationDraft = RelativeAllocationDraft.builder()
             .percentage(0.3)
             .build()
 
  • Field Details

  • Method Details

    • getPercentage

      @NotNull @NotNull Integer getPercentage()

      Percentage of the Order total allocated to the Payment Method. For example, 100 allocates the entire Order total.

      Returns:
      percentage
    • setPercentage

      void setPercentage(Integer percentage)

      Percentage of the Order total allocated to the Payment Method. For example, 100 allocates the entire Order total.

      Parameters:
      percentage - value to be set
    • of

      factory method
      Returns:
      instance of RelativeAllocationDraft
    • of

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

      Specified by:
      copyDeep in interface AllocationDraft
    • deepCopy

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

      builder factory method for RelativeAllocationDraft
      Returns:
      builder
    • builder

      create builder for RelativeAllocationDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withRelativeAllocationDraft

      default <T> T withRelativeAllocationDraft(Function<RelativeAllocationDraft,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static tools.jackson.core.type.TypeReference<RelativeAllocationDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference