Interface Allocation

All Known Subinterfaces:
AbsoluteAllocation, RelativeAllocation

public interface Allocation

Share of the Order total that a RecurringPaymentAllocation covers.


Example to create a subtype instance using the builder pattern

     Allocation allocation = Allocation.absoluteBuilder()
             amount(amountBuilder -> amountBuilder)
             .build()
 
  • Method Details

    • getType

      @NotNull @NotNull String getType()

      Type of the Allocation.

      Returns:
      type
    • copyDeep

      Allocation copyDeep()
    • deepCopy

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

      static AbsoluteAllocationBuilder absoluteBuilder()
      builder for absolute subtype
      Returns:
      builder
    • relativeBuilder

      static RelativeAllocationBuilder relativeBuilder()
      builder for relative subtype
      Returns:
      builder
    • withAllocation

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