Interface RefundEventItemService<P extends RefundEventItem>

All Superinterfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>
All Known Implementing Classes:
DefaultRefundEventItemService

public interface RefundEventItemService<P extends RefundEventItem> extends com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>
Author:
Jacob Mitash
  • Method Details

    • findById

      @Deprecated(since="1.0.0") default Optional<P> findById(String id)
      Deprecated.
      Use CrudEntityService.readByContextId(String, ContextInfo) instead
      Finds a refund event item by it's ID.
      Parameters:
      id - the refund event item's ID
      Returns:
      the refund event item with the ID
    • create

      @Deprecated(since="1.0.0") default P create(P refundEventItem)
      Deprecated.
      Use CrudEntityService.create(Object, ContextInfo) instead
      Saves a new refund event item.
      Parameters:
      refundEventItem - the refund event item to create
      Returns:
      a saved version of the refund event item
    • update

      @Deprecated(since="1.0.0") default P update(P refundEventItem)
      Deprecated.
      Use CrudEntityService.update(String, Object, ContextInfo) instead
      Saves changes to a refund event item.
      Parameters:
      refundEventItem - the refund event item to save changes for
      Returns:
      a saved version of the refund event item
    • findByBillingItemId

      @Deprecated(since="1.0.0") default Set<P> findByBillingItemId(String itemId)
      Finds all refund event items belonging to a billing item.
    • readByBillingEventItemId

      Set<P> readByBillingEventItemId(String billingEventItemId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds all refund event items belonging to a billing item.
    • findByBillingItemIds

      @Deprecated(since="1.0.0") default Set<P> findByBillingItemIds(Set<String> itemIds)
      Finds all refund event items belonging to the billing items.
    • readByBillingEventItemIds

      Set<P> readByBillingEventItemIds(Set<String> billingEventItemIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds all refund event items belonging to the billing items.
      Returns:
      refund event items belonging to the items
    • findByRefundId

      @Deprecated(since="1.0.0") default Set<P> findByRefundId(String refundEventId)
      Finds all refund event items belonging to a refund event.
    • readByRefundEventId

      Set<P> readByRefundEventId(String refundEventId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds all refund event items belonging to a refund event.
      Returns:
      refund event items belonging to the refund event
    • calculateTax

      @Deprecated(since="1.0.0") default void calculateTax(P refundEventItem)
      Calculate and apply tax values for a refund event item based off of it's corresponding billing event item and refund amounts.
    • calculateTax

      void calculateTax(P refundEventItem, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Calculate and apply tax values for a refund event item based off of it's corresponding billing event item and refund amounts.
    • calculateRefundTotal

      BigDecimal calculateRefundTotal(Collection<P> items)
      Calculates the total amount to refund for a collection of refund event items. This is essentially the sum of calculateRefundTotal(RefundEventItem) for every item in the collection.
      Parameters:
      items - the items to calculate a refund total of
      Returns:
      the total refund amount for the given items
    • calculateRefundTotal

      BigDecimal calculateRefundTotal(P item)
      Calculates the total amount to refund for a single refund event item.
      Parameters:
      item - the item to calculate the refund total of
      Returns:
      the total refund amount for the given item