Interface AbsoluteAllocationDraft

All Superinterfaces:
AllocationDraft, Draft<AbsoluteAllocationDraft>

public interface AbsoluteAllocationDraft extends AllocationDraft, Draft<AbsoluteAllocationDraft>

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


Example to create an instance using the builder pattern

     AbsoluteAllocationDraft absoluteAllocationDraft = AbsoluteAllocationDraft.builder()
             .amount(amountBuilder -> amountBuilder)
             .build()
 
  • Field Details

  • Method Details

    • getAmount

      @NotNull @Valid @NotNull @Valid HighPrecisionMoneyDraft getAmount()

      Amount of the Order total allocated to the Payment Method.

      Returns:
      amount
    • setAmount

      void setAmount(HighPrecisionMoneyDraft amount)

      Amount of the Order total allocated to the Payment Method.

      Parameters:
      amount - value to be set
    • of

      factory method
      Returns:
      instance of AbsoluteAllocationDraft
    • of

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

      Specified by:
      copyDeep in interface AllocationDraft
    • deepCopy

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

      builder factory method for AbsoluteAllocationDraft
      Returns:
      builder
    • builder

      create builder for AbsoluteAllocationDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withAbsoluteAllocationDraft

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