Interface SubscriptionItemAdjustmentService<P extends SubscriptionItemAdjustment>

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

public interface SubscriptionItemAdjustmentService<P extends SubscriptionItemAdjustment> extends com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>
  • Method Details

    • findById

      @Deprecated(since="1.0.0") default Optional<P> findById(String itemAdjustmentId)
      Deprecated.
    • findById

      Optional<P> findById(String itemAdjustmentId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • findAllByIds

      @Deprecated(since="1.0.0") default List<P> findAllByIds(List<String> ids)
    • findAllByIds

      List<P> findAllByIds(Collection<String> ids, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • findAllBySubscriptionItemIdsIn

      List<P> findAllBySubscriptionItemIdsIn(Collection<String> ids, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Reads all of the SubscriptionItemAdjustments for all the provided IDs.
      Parameters:
      ids - The SubscriptionItem IDs whose SubscriptionItemAdjustments should be read.
      contextInfo - Additional sandbox and multitenant info
      Returns:
      All of the SubscriptionItemAdjustments for all the provided IDs.
    • findForSubscriptionItemId

      @Deprecated(since="1.0.0") default List<P> findForSubscriptionItemId(String subscriptionItemId)
    • findBySubscriptionItemId

      List<P> findBySubscriptionItemId(String subscriptionItemId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • addItemAdjustment

      @Deprecated(since="1.0.0") default P addItemAdjustment(P subscriptionItemAdjustment)
      Deprecated.
      Use CrudEntityService.create(Object, ContextInfo) instead
    • removeItemAdjustment

      @Deprecated(since="1.0.0") default void removeItemAdjustment(String itemAdjustmentId)
      Deprecated.
      Use CrudEntityService.delete(String, ContextInfo) instead
    • commit

      void commit(String subscriptionId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Apply any uncommitted changes to the production state. Subscriptions are not only locked during a modification flow, but changes are also stored in a temporary modification state. When the modification flow is complete, this method is called to finalize the changes.

      Special note, during the modification flow, any retrieval of the subscription (and dependents) will return the modified state. However, the billing view of the subscription will continue to see the unmodified state until this method is called and the changes are finalized.

      Parameters:
      subscriptionId - the subscription to commit
      contextInfo - context information around multi-tenant state
    • revert

      void revert(String subscriptionId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Revert any uncommitted changes. This will remove any changes that have been made during the modification flow and leave the production state untouched.
      Parameters:
      subscriptionId - the subscription to revert
      contextInfo - context information around multi-tenant state
      See Also:
    • bulkRemoveSubscriptionItemAdjustments

      RemoveSubscriptionItemAdjustmentResponse bulkRemoveSubscriptionItemAdjustments(RemoveSubscriptionItemAdjustmentRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Removes SubscriptionItemAdjustment with the provided ids.
      Parameters:
      request - the RemoveSubscriptionItemAdjustmentRequest to remove the item adjustments
      contextInfo - context information around multi-tenant state
      Returns:
      the RemoveSubscriptionItemAdjustmentResponse that contains an information about removed SubscriptionItemAdjustments