Interface SubscriptionBillingEventGeneratorService
- All Known Implementing Classes:
DefaultSubscriptionBillingEventGeneratorService
public interface SubscriptionBillingEventGeneratorService
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.commons.lang3.tuple.Pair<SubscriptionWithItemsAndAdjustments,List<BillingEvent>> generateBillingEventsForNextSubscriptionPeriod(SubscriptionWithItemsAndAdjustments subscription, SubscriptionNextPeriodBillingEventGenerationRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) CreatebillingEventDTOsto process charges if neededdefault org.apache.commons.lang3.tuple.Pair<SubscriptionWithItemsAndAdjustments,List<BillingEvent>> generateBillingEventsForNextSubscriptionPeriod(SubscriptionWithItemsAndAdjustments subscription, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) CreatebillingEventDTOsto process charges if neededdefault voidprocessSubscriptionsAndSaveRecords(String subscriptionJobId, SubscriptionWithItemsAndAdjustments subscriptions, Date billDate) Deprecated.voidprocessSubscriptionsAndSaveRecords(String subscriptionJobId, SubscriptionWithItemsAndAdjustments subscription, Date billDate, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Adopt the next status for subscription and createbillingEventDTOsto process charges if needed
-
Method Details
-
processSubscriptionsAndSaveRecords
@Deprecated(since="1.0.0") default void processSubscriptionsAndSaveRecords(String subscriptionJobId, SubscriptionWithItemsAndAdjustments subscriptions, Date billDate) -
processSubscriptionsAndSaveRecords
void processSubscriptionsAndSaveRecords(String subscriptionJobId, SubscriptionWithItemsAndAdjustments subscription, Date billDate, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Adopt the next status for subscription and createbillingEventDTOsto process charges if needed- Parameters:
subscriptionJobId- subscription job idsubscription- subscription with items and adjustments to processbillDate- bill date of this runcontextInfo- context information around multi-tenant state
-
generateBillingEventsForNextSubscriptionPeriod
default org.apache.commons.lang3.tuple.Pair<SubscriptionWithItemsAndAdjustments,List<BillingEvent>> generateBillingEventsForNextSubscriptionPeriod(SubscriptionWithItemsAndAdjustments subscription, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) CreatebillingEventDTOsto process charges if needed- Parameters:
subscription- subscription with items and adjustments to processcontextInfo- context information around multi-tenant state- Returns:
- The updated
SubscriptionWithItemsAndAdjustments
-
generateBillingEventsForNextSubscriptionPeriod
org.apache.commons.lang3.tuple.Pair<SubscriptionWithItemsAndAdjustments,List<BillingEvent>> generateBillingEventsForNextSubscriptionPeriod(SubscriptionWithItemsAndAdjustments subscription, @Nullable SubscriptionNextPeriodBillingEventGenerationRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) CreatebillingEventDTOsto process charges if neededNote that the subscription being processed here does not get advanced into the next period. That is expected to be handled after successful payment processing of the generated billing events, see
BillingProcessingResultHandler.- Parameters:
subscription- subscription with items and adjustments to processrequest- Request object describing the context around the request to generate a BillingEventcontextInfo- context information around multi-tenant state- Returns:
- The updated
SubscriptionWithItemsAndAdjustments
-
processSubscriptionsAndSaveRecords(String, SubscriptionWithItemsAndAdjustments, Date, ContextInfo)instead