Class DefaultBillingProcessingResultHandlerService
java.lang.Object
com.broadleafcommerce.billing.job.service.impl.DefaultBillingProcessingResultHandlerService
- All Implemented Interfaces:
BillingProcessingResultHandlerService
public class DefaultBillingProcessingResultHandlerService
extends Object
implements BillingProcessingResultHandlerService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BillingJobPropertiesprotected QueryUtilprotected SubscriptionService<Subscription,SubscriptionWithItems> protected com.broadleafcommerce.common.extension.TypeFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprocessEffectsOfBillingOnRelatedEntities(BillingProcessingResultHandlerDTO dto, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Process effects of billing results on related entities (i.e.voidreconcileCancellationsDuringBilling(BillingProcessingResultHandlerDTO billingProcessingResultHandlerDTO, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Intentionally process these cancellations in a separate transactional block to allow the successfully billed subscriptions to record their active status.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.billing.job.service.BillingProcessingResultHandlerService
reconcileCancellationsDuringBilling, updateRecordsAndSendMessage
-
Field Details
-
subscriptionService
-
typeFactory
@Autowired protected com.broadleafcommerce.common.extension.TypeFactory typeFactory -
queryUtil
-
billingJobProperties
-
-
Constructor Details
-
DefaultBillingProcessingResultHandlerService
public DefaultBillingProcessingResultHandlerService()
-
-
Method Details
-
processEffectsOfBillingOnRelatedEntities
@Transactional public void processEffectsOfBillingOnRelatedEntities(BillingProcessingResultHandlerDTO dto, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:BillingProcessingResultHandlerServiceProcess effects of billing results on related entities (i.e. subscriptions and entitlements).- Specified by:
processEffectsOfBillingOnRelatedEntitiesin interfaceBillingProcessingResultHandlerService
-
reconcileCancellationsDuringBilling
@Transactional public void reconcileCancellationsDuringBilling(BillingProcessingResultHandlerDTO billingProcessingResultHandlerDTO, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Intentionally process these cancellations in a separate transactional block to allow the successfully billed subscriptions to record their active status.
The call toSubscriptionService.cancelSubscription(Subscription, String, ContextInfo)is done expecting the cancellation to fall within the grace period & therefore cause a refund of the charge.- Specified by:
reconcileCancellationsDuringBillingin interfaceBillingProcessingResultHandlerService
-