Interface SubscriptionAdjustmentService<P extends SubscriptionAdjustment>

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

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

    • findById

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

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

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

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

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

      @Deprecated(since="1.0.0") default List<P> findForSubscriptionId(String subscriptionId)
    • findBySubscriptionId

      List<P> findBySubscriptionId(String subscriptionId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • addAdjustment

      @Deprecated(since="1.0.0") default P addAdjustment(P subscriptionAdjustment)
      Deprecated.
      Use CrudEntityService.create(Object, ContextInfo) instead
    • removeAdjustment

      @Deprecated(since="1.0.0") default void removeAdjustment(String adjustmentId)
      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: