Uses of Class
com.broadleafcommerce.orderoperation.service.payment.DefaultPaymentRefundService.PaymentWithRefundableAmount
-
Uses of DefaultPaymentRefundService.PaymentWithRefundableAmount in com.broadleafcommerce.orderoperation.service.payment
Modifier and TypeMethodDescriptionDefaultPaymentRefundService.buildPaymentWithRefundableAmount
(PaymentSummary paymentSummary) DefaultPaymentRefundService.getNextPaymentWithRefundableAmount
(List<DefaultPaymentRefundService.PaymentWithRefundableAmount> paymentWithRefundableAmounts) Gets the nextDefaultPaymentRefundService.PaymentWithRefundableAmount
that has amount available for refund.DefaultPaymentRefundService.getPaymentWithRefundableAmountById
(List<DefaultPaymentRefundService.PaymentWithRefundableAmount> paymentWithRefundableAmounts, String paymentId) Gets theDefaultPaymentRefundService.PaymentWithRefundableAmount
from the given payment id.Modifier and TypeMethodDescriptionDefaultPaymentRefundService.getPaymentWithRefundableAmounts
(@NonNull com.broadleafcommerce.order.client.domain.Order order, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Looks through the givenOrder
and returns allPaymentWithRefundableAmounts
that have some non-reverse amount still available for refund.Modifier and TypeMethodDescriptionprotected javax.money.MonetaryAmount
DefaultPaymentRefundService.getAmountToRefund
(DefaultPaymentRefundService.PaymentWithRefundableAmount paymentWithRefundableAmount, javax.money.MonetaryAmount remainingToRefund) Gets the amount to refund based on the givenDefaultPaymentRefundService.PaymentWithRefundableAmount
and remaining to refund.Modifier and TypeMethodDescriptionDefaultPaymentRefundService.buildFromPaymentDistributionDetails
(@NonNull javax.money.MonetaryAmount totalToRefund, @NonNull List<DefaultPaymentRefundService.PaymentWithRefundableAmount> paymentWithRefundableAmounts, @NonNull com.broadleafcommerce.order.client.domain.Order order, @NonNull String fulfillmentId, boolean isForReturnConfirmation, com.broadleafcommerce.order.client.domain.ReturnConfirmation returnConfirmation) Builds a list ofPaymentRefundPackages
based on theOrder.getPaymentDistributionDetails()
.DefaultPaymentRefundService.buildFromPaymentPriority
(@NonNull javax.money.MonetaryAmount totalToRefund, @NonNull List<DefaultPaymentRefundService.PaymentWithRefundableAmount> paymentWithRefundableAmounts, @NonNull com.broadleafcommerce.order.client.domain.Order order, @NonNull String fulfillmentId, boolean isForReturnConfirmation, com.broadleafcommerce.order.client.domain.ReturnConfirmation returnConfirmation) Builds a list ofPaymentRefundPackages
based on the payment priority.DefaultPaymentRefundService.buildFulfillmentPaymentRefundPackages
(@NonNull com.broadleafcommerce.order.client.domain.Order order, @NonNull com.broadleafcommerce.order.client.domain.OrderFulfillment fulfillment, @NonNull javax.money.MonetaryAmount totalToRefund, @NonNull List<DefaultPaymentRefundService.PaymentWithRefundableAmount> paymentWithRefundableAmounts) BuildsPaymentRefundPackages
to refund for the fulfillment, consuming amounts fromtransactionsWithRefundableAmountsByPaymentId
as necessary.protected PaymentDistributionDto
DefaultPaymentRefundService.buildPaymentDistributionDto
(@NonNull com.broadleafcommerce.order.client.domain.Order order, @NonNull javax.money.MonetaryAmount totalToDistribute, @NonNull List<DefaultPaymentRefundService.PaymentWithRefundableAmount> paymentWithRefundableAmounts) DefaultPaymentRefundService.buildPaymentRefundPackages
(@NonNull com.broadleafcommerce.order.client.domain.Order order, @NonNull String fulfillmentId, @NonNull javax.money.MonetaryAmount totalToRefund, @NonNull List<DefaultPaymentRefundService.PaymentWithRefundableAmount> paymentWithRefundableAmounts, boolean isForReturnConfirmation, com.broadleafcommerce.order.client.domain.ReturnConfirmation returnConfirmation) DefaultPaymentRefundService.buildPaymentRefundPackagesFromDistribution
(@NonNull PaymentDistributionResult distributionResult, @NonNull List<DefaultPaymentRefundService.PaymentWithRefundableAmount> paymentWithRefundableAmounts, @NonNull com.broadleafcommerce.order.client.domain.Order order, @NonNull String fulfillmentId, boolean isForReturnConfirmation, com.broadleafcommerce.order.client.domain.ReturnConfirmation returnConfirmation) Builds a list ofPaymentRefundPackages
from the givenPaymentDistributionResult
.DefaultPaymentRefundService.buildReturnPaymentRefundPackages
(@NonNull com.broadleafcommerce.order.client.domain.Order order, @NonNull List<DefaultPaymentRefundService.PaymentWithRefundableAmount> paymentWithRefundableAmounts, @NonNull com.broadleafcommerce.order.client.domain.ReturnConfirmation returnConfirmation, @NonNull String fulfillmentId) BuildsReturnPaymentRefundPackages
for the givenPaymentWithRefundableAmounts
andReturnConfirmation
.DefaultPaymentRefundService.buildReturnPaymentRefundPackages
(@NonNull com.broadleafcommerce.order.client.domain.Order order, @NonNull Map<String, List<com.broadleafcommerce.order.client.domain.ReturnConfirmation>> pendingReturnConfirmationsByFulfillmentId, @NonNull List<DefaultPaymentRefundService.PaymentWithRefundableAmount> paymentWithRefundableAmounts) Iterates throughpendingReturnConfirmationsByFulfillmentId
, consuming amounts frompaymentWithRefundableAmounts
as necessary and buildingReturnPaymentRefundPackages
.DefaultPaymentRefundService.getNextPaymentWithRefundableAmount
(List<DefaultPaymentRefundService.PaymentWithRefundableAmount> paymentWithRefundableAmounts) Gets the nextDefaultPaymentRefundService.PaymentWithRefundableAmount
that has amount available for refund.DefaultPaymentRefundService.getPaymentWithRefundableAmountById
(List<DefaultPaymentRefundService.PaymentWithRefundableAmount> paymentWithRefundableAmounts, String paymentId) Gets theDefaultPaymentRefundService.PaymentWithRefundableAmount
from the given payment id.protected void
DefaultPaymentRefundService.validateEntireRequestedAmountIsAvailableForRefund
(@NonNull Map<String, List<com.broadleafcommerce.order.client.domain.ReturnConfirmation>> pendingReturnConfirmationsByFulfillmentId, @NonNull List<DefaultPaymentRefundService.PaymentWithRefundableAmount> paymentWithRefundableAmounts, @NonNull com.broadleafcommerce.order.client.domain.Order order) Sums the total amount that needs to be refunded forpendingReturnConfirmationsByFulfillmentId
, and compares it to the sum of available refundable amounts inpaymentWithRefundableAmounts
.protected void
DefaultPaymentRefundService.validateEntireRequestedAmountIsAvailableForRefund
(@NonNull javax.money.MonetaryAmount totalToRefund, @NonNull List<DefaultPaymentRefundService.PaymentWithRefundableAmount> paymentWithRefundableAmounts, @NonNull com.broadleafcommerce.order.client.domain.Order order) Compares the total amount to refund to the sum of available refundable amounts inpaymentWithRefundableAmounts
.