Class DefaultBillingEventPricingService<P extends BillingEventDTO,Q extends BillingEvent,R extends BillingEventAdjustment,S extends BillingEventItemWithTaxDetails,T extends BillingEventPaymentWithTransaction>
java.lang.Object
com.broadleafcommerce.billing.job.service.impl.DefaultBillingEventPricingService<P,Q,R,S,T>
- All Implemented Interfaces:
BillingEventPricingService<P,Q, R, S, T>
public class DefaultBillingEventPricingService<P extends BillingEventDTO,Q extends BillingEvent,R extends BillingEventAdjustment,S extends BillingEventItemWithTaxDetails,T extends BillingEventPaymentWithTransaction>
extends Object
implements BillingEventPricingService<P,Q,R,S,T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PcalculateTotals(P billingEventDTO, boolean ignoreTaxes) executePricing(P event) Responsible for setting all the totals correctly on the new billing event based on the state of the passed in event (i.e.executePricing(P event, boolean ignoreTaxes) Responsible for setting all the totals correctly on the new billing event based on the state of the passed in event.voidrecalculatePricing(Q event, List<R> billingEventAdjustments, List<S> billingEventItemWithTaxDetailsList, List<T> billingEventPaymentWithTransactionList) Responsible for re-setting all the totals on an existing billing event.protected voidsetEventAndPaymentTotals(Q event, List<R> billingEventAdjustments, List<S> billingEventItemWithTaxDetailsList, List<T> billingEventPaymentWithTransactionList) protected voidsetItemSums(List<S> billingEventItemWithTaxDetailsList) protected voidsetTaxSums(Q billingEvent, List<S> billingEventItemWithTaxDetailsList)
-
Constructor Details
-
DefaultBillingEventPricingService
public DefaultBillingEventPricingService()
-
-
Method Details
-
executePricing
Description copied from interface:BillingEventPricingServiceResponsible for setting all the totals correctly on the new billing event based on the state of the passed in event (i.e. assumes all necessary tax details have already been applied and set on the new billing event).- Specified by:
executePricingin interfaceBillingEventPricingService<P extends BillingEventDTO,Q extends BillingEvent, R extends BillingEventAdjustment, S extends BillingEventItemWithTaxDetails, T extends BillingEventPaymentWithTransaction>
-
executePricing
Description copied from interface:BillingEventPricingServiceResponsible for setting all the totals correctly on the new billing event based on the state of the passed in event. Will ignore tax totalling if ignoreTaxes is true- Specified by:
executePricingin interfaceBillingEventPricingService<P extends BillingEventDTO,Q extends BillingEvent, R extends BillingEventAdjustment, S extends BillingEventItemWithTaxDetails, T extends BillingEventPaymentWithTransaction>
-
recalculatePricing
public void recalculatePricing(Q event, List<R> billingEventAdjustments, List<S> billingEventItemWithTaxDetailsList, List<T> billingEventPaymentWithTransactionList) Description copied from interface:BillingEventPricingServiceResponsible for re-setting all the totals on an existing billing event. e.g. if the billing event is passed to the taxing engine to re-calculate the latest tax for the provided billing items.- Specified by:
recalculatePricingin interfaceBillingEventPricingService<P extends BillingEventDTO,Q extends BillingEvent, R extends BillingEventAdjustment, S extends BillingEventItemWithTaxDetails, T extends BillingEventPaymentWithTransaction>
-
calculateTotals
-
setEventAndPaymentTotals
-
setItemSums
-
setTaxSums
-