Interface PaymentPriorityStrategy
-
- All Known Implementing Classes:
DefaultPaymentPriorityStrategy
public interface PaymentPriorityStrategy
A helper component that has understanding of whichPaymentSummaries
take precedence and should be applied first in various operations such as payment capture and refund.- Author:
- Samarth Dhruva (samarthd)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<PaymentSummary>
sortByRefundPriority(List<PaymentSummary> payments)
Given a list ofPaymentSummaries
, sorts them in order of which should be refunded first.
-
-
-
Method Detail
-
sortByRefundPriority
List<PaymentSummary> sortByRefundPriority(@Nullable List<PaymentSummary> payments)
Given a list ofPaymentSummaries
, sorts them in order of which should be refunded first.- Parameters:
payments
- the payments to sort- Returns:
- a new list representing the sorted result. Will be empty if
payments
is null or empty.
-
-