Interface RecurringPaymentAllocation


public interface RecurringPaymentAllocation

Assigns a share of the Order total to a specific PaymentMethod.


Example to create an instance using the builder pattern

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

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the RecurringPaymentAllocation within the RecurringPaymentConfiguration. Use it to remove the allocation with the Remove RecurringPaymentAllocation update action.

      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 Allocation getAllocation()

      Share of the Order total charged to the paymentMethod.

      Returns:
      allocation
    • setId

      void setId(String id)

      Unique identifier of the RecurringPaymentAllocation within the RecurringPaymentConfiguration. Use it to remove the allocation with the Remove RecurringPaymentAllocation update action.

      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(Allocation allocation)

      Share of the Order total charged to the paymentMethod.

      Parameters:
      allocation - value to be set
    • of

      factory method
      Returns:
      instance of RecurringPaymentAllocation
    • of

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

    • deepCopy

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

      builder factory method for RecurringPaymentAllocation
      Returns:
      builder
    • builder

      create builder for RecurringPaymentAllocation instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withRecurringPaymentAllocation

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