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 ofPaymentSummaries
based on thePayment
.default PaymentSummary
buildPaymentSummary
(@NonNull Payment payment) buildPaymentSummary
(Payment payment, String sourceEntityType, String sourceEntityId) DeterminesPaymentSummary
based on thePayment's
PaymentTransactions
and the givenPaymentTransaction.getSourceEntityType()
andPaymentTransaction.getSourceEntityId()
.buildPaymentSummary
(Payment payment, Set<String> sourceEntityTypes) DeterminesPaymentSummary
based on thePayment's
PaymentTransactions
and 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 ofPaymentSummaries
based 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) DeterminesPaymentSummary
based on thePayment's
PaymentTransactions
and 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
DeterminesPaymentSummary
based on thePayment's
PaymentTransactions
and 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
-