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 Details

    • findById

      @Deprecated(since="1.0.0") default Optional<P> findById(String id)
      Deprecated.
      Use CrudEntityService.readByContextId(String, ContextInfo) instead
    • findById

      @Deprecated(since="1.0.0") default Optional<Q> findById(String id, boolean deepFind)
    • readByIdWithDetails

      Optional<Q> readByIdWithDetails(String id, boolean deepFind, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Returns a billing event details container for a BillingEvent with the given id. The 'deepFind' param of true will also obtain:
      • BillingEventDTO.billingEventPaymentWithTransactions
      • BillingEventDTO.billingEventItemWithTaxDetails
      • BillingEventDTO.billingEventAddress
    • findBillingEventsByIds

      @Deprecated(since="1.0.0") default List<Q> findBillingEventsByIds(Set<String> ids)
      Finds billing events containing an ID in ids. 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 in ids. Returns them in container objects - BillingEventDTO
    • findBillingEventByUserId

      @Deprecated(since="1.0.0") default List<P> findBillingEventByUserId(String userRef)
      Deprecated.
    • readByUserRef

      List<P> readByUserRef(String userRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Read BillingEvent entities by userRef
    • findBillingEventByUserId

      @Deprecated(since="1.0.0") default List<Q> findBillingEventByUserId(String userRef, boolean deepFind)
    • readBillingEventDTOByUserRef

      List<Q> readBillingEventDTOByUserRef(String userRef, boolean deepFind, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Read billing events by userId. The 'deepFind' param of true will also obtain:
      • BillingEventDTO.billingEventPaymentWithTransactions
      • BillingEventDTO.billingEventItemWithTaxDetails
      • BillingEventDTO.billingEventAddress

        Regardless, it returns container objects - BillingEventDTO.

    • createBillingEvent

      @Deprecated(since="1.0.0") default P createBillingEvent(Q billingEventDTO)
      Deprecated.
    • create

      P create(Q billingEventDTO, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Parameters:
      billingEventDTO - a DTO that holds objects related to a billing event
      contextInfo - 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 a create request that came from an external source, performs validation and then delegates to create(CreateBillingEventRequest, ContextInfo) to create a billing event and related objects
      Parameters:
      createRequest - a request to create a billing event and related objects
      contextInfo - 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 of create requests that came from an external source, performs validation and then delegates to CrudEntityService.createAll(List, ContextInfo) to create billing events and related objects
      Parameters:
      createRequests - a list of requests to create billing events and related objects
      contextInfo - 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 a BillingEvent and related objects
      Parameters:
      createRequest - a request to create a billing event and related objects
      contextInfo - context information around multi-tenant state
      Returns:
      a created billing event
    • updateBillingEvent

      @Deprecated(since="1.0.0") default P updateBillingEvent(P original, P patchReq)
      Deprecated.
      Use CrudEntityService.update(String, Object, ContextInfo) instead
    • updateAllBillingDetails

      @Deprecated(since="1.0.0") default List<Q> updateAllBillingDetails(List<Q> billingEventDTOs)
    • updateBillingDetails

      List<Q> updateBillingDetails(List<Q> billingEventDTOs, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • updateBillingDetailsFromBillingEvent

      @Deprecated(since="1.0.0") default Q updateBillingDetailsFromBillingEvent(Q billingEventDTO)
    • updateBillingDetails

      Q updateBillingDetails(Q billingEventDTO, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • findBillingEventsBySubscriptionId

      @Deprecated(since="1.0.0") default List<P> findBillingEventsBySubscriptionId(String subscriptionRef)
    • readBySubscriptionRef

      List<P> readBySubscriptionRef(String subscriptionRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Reads all BillingEvent entities by subscription reference
    • findBySubscriptionRefIn

      List<P> findBySubscriptionRefIn(List<String> subscriptionIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Reads all BillingEvent entities by subscription reference IDs
    • findBillingEventsBySubscriptionId

      @Deprecated(since="1.0.0") default List<Q> findBillingEventsBySubscriptionId(String subscriptionRef, boolean deepFind)
    • readBillingEventDTOsBySubscriptionRef

      List<Q> readBillingEventDTOsBySubscriptionRef(String subscriptionRef, boolean deepFind, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Reads BillingEvent entities by subscription id. If 'deepFind' is true, it will also obtain:
      • BillingEventDTO.billingEventPaymentWithTransactions
      • BillingEventDTO.billingEventItemWithTaxDetails
      • BillingEventDTO.billingEventAddress
      Regardless, it returns container objects - 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 the BillingEvent by subscription Id, where the BillingEvent.getSubscriptionPeriod() is greater than or equals to the provided period.
      Parameters:
      subscriptionRef - the subscription id
      requestedPeriod - the Subscription's period that correlates to this BillingEvent
      page - information about which page of results to return from the database
      contextInfo - Context information for data tracking.
      Returns:
      a page container objects - BillingEventDTO with additional details
    • findBillingEventsBySubscriptionIds

      @Deprecated(since="1.0.0") default List<Q> findBillingEventsBySubscriptionIds(Set<String> subscriptionRefs)
      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(since="1.0.0") default List<P> findByOrderReference(String orderRef)
      Deprecated.
      Finds 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

      R convertToCreateBillingEventRequest(Q billingEventDTO)
      Converts a BillingEventService into a more appropriate for creation creation request
      Parameters:
      billingEventDTO - a DTO that holds objects related to a billing event
      Returns:
      built creation request