Class DefaultSubscriptionBillingEventService<B extends BillingEvent>
java.lang.Object
com.broadleafcommerce.billing.service.impl.DefaultSubscriptionBillingEventService<B>
- All Implemented Interfaces:
SubscriptionBillingEventService<B>
public class DefaultSubscriptionBillingEventService<B extends BillingEvent>
extends Object
implements SubscriptionBillingEventService<B>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SubscriptionBillingEventGeneratorServiceprotected final com.broadleafcommerce.common.extension.TypeFactory -
Constructor Summary
ConstructorsConstructorDescriptionDefaultSubscriptionBillingEventService(SubscriptionService<Subscription, SubscriptionWithItems> subscriptionService, SubscriptionAdjustmentService<SubscriptionAdjustment> subscriptionAdjustmentService, SubscriptionBillingEventGeneratorService subscriptionBillingEventGeneratorService, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptiongenerateBillingEventsForNextSubscriptionPeriod(@NonNull SubscriptionNextPeriodBillingEventGenerationRequest billingEventGenerationRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Generates a collection ofBillingEventsbased on the provided request.protected SubscriptionBillingEventGeneratorServiceprotected SubscriptionService<Subscription,SubscriptionWithItems> protected SubscriptionWithItemsAndAdjustmentsgetSubscriptionWithItemsAndAdjustments(@NonNull String subscriptionId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected com.broadleafcommerce.common.extension.TypeFactory
-
Field Details
-
subscriptionBillingEventGeneratorService
-
typeFactory
protected final com.broadleafcommerce.common.extension.TypeFactory typeFactory
-
-
Constructor Details
-
DefaultSubscriptionBillingEventService
public DefaultSubscriptionBillingEventService(SubscriptionService<Subscription, SubscriptionWithItems> subscriptionService, SubscriptionAdjustmentService<SubscriptionAdjustment> subscriptionAdjustmentService, SubscriptionBillingEventGeneratorService subscriptionBillingEventGeneratorService, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
generateBillingEventsForNextSubscriptionPeriod
public Collection<B> generateBillingEventsForNextSubscriptionPeriod(@NonNull @NonNull SubscriptionNextPeriodBillingEventGenerationRequest billingEventGenerationRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:SubscriptionBillingEventServiceGenerates a collection ofBillingEventsbased on the provided request.- Specified by:
generateBillingEventsForNextSubscriptionPeriodin interfaceSubscriptionBillingEventService<B extends BillingEvent>- Parameters:
billingEventGenerationRequest- payload describing theBillingEventsthat are to be generatedcontextInfo- context information around multi-tenant state- Returns:
- A collection of
BillingEvents
-
getSubscriptionWithItemsAndAdjustments
protected SubscriptionWithItemsAndAdjustments getSubscriptionWithItemsAndAdjustments(@NonNull @NonNull String subscriptionId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
getSubscriptionService
-
getSubscriptionAdjustmentService
-
getSubscriptionBillingEventGeneratorService
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-