Interface BillingEventService<P extends BillingEvent,Q extends BillingEventDTO,R extends CreateBillingEventRequest>
- All Superinterfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>
- All Known Implementing Classes:
DefaultBillingEventService
public interface BillingEventService<P extends BillingEvent,Q extends BillingEventDTO,R extends CreateBillingEventRequest>
extends com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>
- Author:
- venkat
-
Method Summary
Modifier and TypeMethodDescriptionconvertToCreateBillingEventRequest(Q billingEventDTO) Converts aBillingEventServiceinto a more appropriate for creationcreation requestcreate(CreateBillingEventRequest, ContextInfo)is preferredCreates aBillingEventand related objectsdefault PcreateBillingEvent(Q billingEventDTO) Deprecated.createFromExternalRequest(List<R> createRequests, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Accepts a list ofcreate requeststhat came from an external source, performs validation and then delegates toCrudEntityService.createAll(List, ContextInfo)to create billing events and related objectscreateFromExternalRequest(R createRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Accepts acreate requestthat came from an external source, performs validation and then delegates tocreate(CreateBillingEventRequest, ContextInfo)to create a billing event and related objectsfindBillingEventByUserId(String userRef) Deprecated.UsereadByUserRef(String, ContextInfo)insteadfindBillingEventByUserId(String userRef, boolean deepFind) Deprecated.findBillingEventsByIds(Set<String> ids) Deprecated.UsereadBillingEventDTOsByIds(Set, ContextInfo)insteadfindBillingEventsBySubscriptionId(String subscriptionRef) Deprecated.UsereadBySubscriptionRef(String, ContextInfo)insteadfindBillingEventsBySubscriptionId(String subscriptionRef, boolean deepFind) Deprecated.findBillingEventsBySubscriptionIds(Set<String> subscriptionRefs) Deprecated.Deprecated.UseCrudEntityService.readByContextId(String, ContextInfo)insteadDeprecated.findByOrderReference(String orderRef) Deprecated.UsereadByOrderRef(String, ContextInfo)insteadfindBySubscriptionRefIn(List<String> subscriptionIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads allBillingEvententities by subscription reference IDsreadBillingEventDTOByUserRef(String userRef, boolean deepFind, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Readbilling eventsby userId.readBillingEventDTOsByIds(Set<String> ids, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds billing events containing an ID inids.readBillingEventDTOsBySubscriptionRef(String subscriptionRef, boolean deepFind, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) ReadsBillingEvententities by subscription id.readBillingEventDTOsBySubscriptionRefs(Set<String> subscriptionRefs, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads container objects,BillingEventDTO, by subscription idorg.springframework.data.domain.Page<Q>readBillingEventsForSubscriptionRefAndPeriodGreaterThanEqual(String subscriptionRef, Integer requestedPeriod, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all theBillingEventby subscription Id, where theBillingEvent.getSubscriptionPeriod()is greater than or equals to the provided period.readByIdWithDetails(String id, boolean deepFind, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns abilling event details containerfor aBillingEventwith the given id.readByOrderRef(String orderRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds billing events by order reference.readBySubscriptionRef(String subscriptionRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads allBillingEvententities by subscription referencereadByUserRef(String userRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) ReadBillingEvententities by userRefupdateAllBillingDetails(List<Q> billingEventDTOs) Deprecated.UseupdateBillingDetails(List, ContextInfo)insteadupdateBillingDetails(List<Q> billingEventDTOs, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) updateBillingDetails(Q billingEventDTO, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) default QupdateBillingDetailsFromBillingEvent(Q billingEventDTO) Deprecated.default PupdateBillingEvent(P original, P patchReq) Deprecated.UseCrudEntityService.update(String, Object, ContextInfo)insteadMethods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService
create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort
-
Method Details
-
findById
Deprecated.UseCrudEntityService.readByContextId(String, ContextInfo)instead -
findById
Deprecated. -
readByIdWithDetails
Optional<Q> readByIdWithDetails(String id, boolean deepFind, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns abilling event details containerfor aBillingEventwith the given id. The 'deepFind' param of true will also obtain:- BillingEventDTO.billingEventPaymentWithTransactions
- BillingEventDTO.billingEventItemWithTaxDetails
- BillingEventDTO.billingEventAddress
-
findBillingEventsByIds
Deprecated.UsereadBillingEventDTOsByIds(Set, ContextInfo)insteadFinds billing events containing an ID inids. Returns them in container objects -BillingEventDTO. -
readBillingEventDTOsByIds
List<Q> readBillingEventDTOsByIds(Set<String> ids, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds billing events containing an ID inids. Returns them in container objects -BillingEventDTO -
findBillingEventByUserId
Deprecated.UsereadByUserRef(String, ContextInfo)instead -
readByUserRef
List<P> readByUserRef(String userRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) ReadBillingEvententities by userRef -
findBillingEventByUserId
@Deprecated(since="1.0.0") default List<Q> findBillingEventByUserId(String userRef, boolean deepFind) Deprecated. -
readBillingEventDTOByUserRef
List<Q> readBillingEventDTOByUserRef(String userRef, boolean deepFind, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Readbilling eventsby userId. The 'deepFind' param of true will also obtain:- BillingEventDTO.billingEventPaymentWithTransactions
- BillingEventDTO.billingEventItemWithTaxDetails
- BillingEventDTO.billingEventAddress
Regardless, it returns container objects -
BillingEventDTO.
-
createBillingEvent
Deprecated.Usecreate(BillingEventDTO, ContextInfo)instead -
create
P create(Q billingEventDTO, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) create(CreateBillingEventRequest, ContextInfo)is preferred- Parameters:
billingEventDTO- a DTO that holds objects related to a billing eventcontextInfo- context information around multi-tenant state- Returns:
- a created billing event
-
createFromExternalRequest
P createFromExternalRequest(R createRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Accepts acreate requestthat came from an external source, performs validation and then delegates tocreate(CreateBillingEventRequest, ContextInfo)to create a billing event and related objects- Parameters:
createRequest- a request to create a billing event and related objectscontextInfo- context information around multi-tenant state- Returns:
- a created billing event
-
createFromExternalRequest
List<P> createFromExternalRequest(List<R> createRequests, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Accepts a list ofcreate requeststhat came from an external source, performs validation and then delegates toCrudEntityService.createAll(List, ContextInfo)to create billing events and related objects- Parameters:
createRequests- a list of requests to create billing events and related objectscontextInfo- context information around multi-tenant state- Returns:
- a list of created billing events
-
create
P create(R createRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Creates aBillingEventand related objects- Parameters:
createRequest- a request to create a billing event and related objectscontextInfo- context information around multi-tenant state- Returns:
- a created billing event
-
updateBillingEvent
Deprecated.UseCrudEntityService.update(String, Object, ContextInfo)instead -
updateAllBillingDetails
Deprecated.UseupdateBillingDetails(List, ContextInfo)instead -
updateBillingDetails
-
updateBillingDetailsFromBillingEvent
Deprecated. -
updateBillingDetails
-
findBillingEventsBySubscriptionId
@Deprecated(since="1.0.0") default List<P> findBillingEventsBySubscriptionId(String subscriptionRef) Deprecated.UsereadBySubscriptionRef(String, ContextInfo)instead -
readBySubscriptionRef
List<P> readBySubscriptionRef(String subscriptionRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads allBillingEvententities by subscription reference -
findBySubscriptionRefIn
List<P> findBySubscriptionRefIn(List<String> subscriptionIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads allBillingEvententities by subscription reference IDs -
findBillingEventsBySubscriptionId
@Deprecated(since="1.0.0") default List<Q> findBillingEventsBySubscriptionId(String subscriptionRef, boolean deepFind) Deprecated. -
readBillingEventDTOsBySubscriptionRef
List<Q> readBillingEventDTOsBySubscriptionRef(String subscriptionRef, boolean deepFind, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) ReadsBillingEvententities by subscription id. If 'deepFind' is true, it will also obtain:- BillingEventDTO.billingEventPaymentWithTransactions
- BillingEventDTO.billingEventItemWithTaxDetails
- BillingEventDTO.billingEventAddress
BillingEventDTO. -
readBillingEventsForSubscriptionRefAndPeriodGreaterThanEqual
org.springframework.data.domain.Page<Q> readBillingEventsForSubscriptionRefAndPeriodGreaterThanEqual(String subscriptionRef, Integer requestedPeriod, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all theBillingEventby subscription Id, where theBillingEvent.getSubscriptionPeriod()is greater than or equals to the provided period.- Parameters:
subscriptionRef- the subscription idrequestedPeriod- theSubscription'speriod that correlates to thisBillingEventpage- information about which page of results to return from the databasecontextInfo- Context information for data tracking.- Returns:
- a page container objects -
BillingEventDTOwith additional details
-
findBillingEventsBySubscriptionIds
@Deprecated(since="1.0.0") default List<Q> findBillingEventsBySubscriptionIds(Set<String> subscriptionRefs) Deprecated.Finds billing events by subscription ID. -
readBillingEventDTOsBySubscriptionRefs
List<Q> readBillingEventDTOsBySubscriptionRefs(Set<String> subscriptionRefs, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads container objects,BillingEventDTO, by subscription id -
findByOrderReference
Deprecated.UsereadByOrderRef(String, ContextInfo)insteadFinds billing events by order reference. -
readByOrderRef
List<P> readByOrderRef(String orderRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds billing events by order reference. -
convertToCreateBillingEventRequest
Converts aBillingEventServiceinto a more appropriate for creationcreation request- Parameters:
billingEventDTO- a DTO that holds objects related to a billing event- Returns:
- built creation request
-
create(BillingEventDTO, ContextInfo)instead