Interface PaymentAllocationDraft

All Superinterfaces:
Draft<PaymentAllocationDraft>

public interface PaymentAllocationDraft extends Draft<PaymentAllocationDraft>

Draft type that stores the data to create a RecurringPaymentAllocation.


Example to create an instance using the builder pattern

     PaymentAllocationDraft paymentAllocationDraft = PaymentAllocationDraft.builder()
             .id("{id}")
             .paymentMethod(paymentMethodBuilder -> paymentMethodBuilder)
             .allocation(allocationBuilder -> allocationBuilder)
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the resulting RecurringPaymentAllocation within the RecurringPaymentConfiguration.

      Returns:
      id
    • getPaymentMethod

      @NotNull @Valid @NotNull @Valid PaymentMethodReference getPaymentMethod()

      Payment Method charged for this share of the Order total.

      Returns:
      paymentMethod
    • getAllocation

      @NotNull @Valid @NotNull @Valid AllocationDraft getAllocation()

      Share of the Order total charged to the paymentMethod.

      Returns:
      allocation
    • setId

      void setId(String id)

      Unique identifier of the resulting RecurringPaymentAllocation within the RecurringPaymentConfiguration.

      Parameters:
      id - value to be set
    • setPaymentMethod

      void setPaymentMethod(PaymentMethodReference paymentMethod)

      Payment Method charged for this share of the Order total.

      Parameters:
      paymentMethod - value to be set
    • setAllocation

      void setAllocation(AllocationDraft allocation)

      Share of the Order total charged to the paymentMethod.

      Parameters:
      allocation - value to be set
    • of

      factory method
      Returns:
      instance of PaymentAllocationDraft
    • of

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

    • deepCopy

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

      builder factory method for PaymentAllocationDraft
      Returns:
      builder
    • builder

      create builder for PaymentAllocationDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withPaymentAllocationDraft

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