Interface AbsoluteAllocation

All Superinterfaces:
Allocation

public interface AbsoluteAllocation extends Allocation

Allocates a fixed amount of the Order total to a Payment Method.


Example to create an instance using the builder pattern

     AbsoluteAllocation absoluteAllocation = AbsoluteAllocation.builder()
             .amount(amountBuilder -> amountBuilder)
             .build()
 
  • Field Details

  • Method Details

    • getAmount

      @NotNull @Valid @NotNull @Valid HighPrecisionMoney getAmount()

      Amount of the Order total allocated to the Payment Method.

      Returns:
      amount
    • setAmount

      void setAmount(HighPrecisionMoney amount)

      Amount of the Order total allocated to the Payment Method.

      Parameters:
      amount - value to be set
    • of

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

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

      AbsoluteAllocation copyDeep()
      Specified by:
      copyDeep in interface Allocation
    • deepCopy

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

      static AbsoluteAllocationBuilder builder()
      builder factory method for AbsoluteAllocation
      Returns:
      builder
    • builder

      static AbsoluteAllocationBuilder builder(AbsoluteAllocation template)
      create builder for AbsoluteAllocation instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withAbsoluteAllocation

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