Interface PaymentSummaryService
- All Known Implementing Classes:
DefaultPaymentSummaryService
public interface PaymentSummaryService
This service provides a mechanism to build a
PaymentSummary based on the state of a
Payment Payment and it's PaymentTransactions.- Author:
- Dima Myroniuk (dmyroniuk)
-
Method Summary
Modifier and TypeMethodDescriptiondefault List<PaymentSummary>buildPaymentSummaries(@NonNull List<Payment> payments) Builds a list ofPaymentSummariesbased on thePayment.default PaymentSummarybuildPaymentSummary(@NonNull Payment payment) buildPaymentSummary(Payment payment, String sourceEntityType, String sourceEntityId) DeterminesPaymentSummarybased on thePayment'sPaymentTransactionsand the givenPaymentTransaction.getSourceEntityType()andPaymentTransaction.getSourceEntityId().buildPaymentSummary(Payment payment, Set<String> sourceEntityTypes) DeterminesPaymentSummarybased on thePayment'sPaymentTransactionsand the givenPaymentTransaction.getSourceEntityType()andPaymentTransaction.getSourceEntityId().
-
Method Details
-
buildPaymentSummary
- Parameters:
payment- the payment to determine the summary- Returns:
- the payment summary for the specified payment
-
buildPaymentSummaries
Builds a list ofPaymentSummariesbased on thePayment.- Parameters:
payments- the payments to build the summaries from- Returns:
- the payment summaries for the provided payments
-
buildPaymentSummary
PaymentSummary buildPaymentSummary(Payment payment, @Nullable String sourceEntityType, @Nullable String sourceEntityId) DeterminesPaymentSummarybased on thePayment'sPaymentTransactionsand the givenPaymentTransaction.getSourceEntityType()andPaymentTransaction.getSourceEntityId().- Parameters:
payment- the payment to determine the summarysourceEntityType- thePaymentTransaction.getSourceEntityType()to filter thePayment.getTransactions()bysourceEntityId- thePaymentTransaction.getSourceEntityId()to filter thePayment.getTransactions()by- Returns:
- the payment summary for the specified payment
-
buildPaymentSummary
DeterminesPaymentSummarybased on thePayment'sPaymentTransactionsand the givenPaymentTransaction.getSourceEntityType()andPaymentTransaction.getSourceEntityId().- Parameters:
payment- the payment to determine the summarysourceEntityTypes- the set ofPaymentTransaction.getSourceEntityType()to filter thePayment.getTransactions()by- Returns:
- the payment summary for the specified payment
-