Interface SubscriptionOpsProvider
- All Known Implementing Classes:
ExternalSubscriptionOpsProvider
public interface SubscriptionOpsProvider
Provider for interacting with SubscriptionOperationServices.
- Since:
- Cart Operation Service 2.3.0, Release Train 2.3.0
-
Method Summary
Modifier and TypeMethodDescriptionClears a lock for a subscription.identifyCancellationPolicy(IdentifyCancellationPolicyRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Identifies the cancellation policy based on the givenIdentifyCancellationPolicyRequest.lockSubscription(String subscriptionId) Locks a subscription.readUserSubscriptionSummary(String userRefType, String userRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Fetches aUserSubscriptionSummarycontaining information about a user's active and former subscriptions.retrieveCancellationPolicyById(String cancellationPolicyId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves aCancellationPolicyby its id.retrieveSubscriptionPricing(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) RetrievesSubscriptionPriceResponsesdescribing how much the customer should be charged now, & estimations for how much & when they'll be charged in the future as part of subscription billing.
-
Method Details
-
retrieveSubscriptionPricing
List<SubscriptionPriceResponse> retrieveSubscriptionPricing(com.broadleafcommerce.cart.client.domain.Cart cart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) RetrievesSubscriptionPriceResponsesdescribing how much the customer should be charged now, & estimations for how much & when they'll be charged in the future as part of subscription billing.- Parameters:
cart- The cart that we are pricing.contextInfo- Context information around sandbox and multitenant state.- Returns:
- a list of
SubscriptionPriceResponses
-
identifyCancellationPolicy
IdentifyCancellationPolicyResponse identifyCancellationPolicy(IdentifyCancellationPolicyRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Identifies the cancellation policy based on the givenIdentifyCancellationPolicyRequest.- Parameters:
request- The request containing the cart items to identify the cancellation policies for.contextInfo- Context information around sandbox and multitenant state.- Returns:
- The
IdentifyCancellationPolicyResponsecontaining the identified cancellation policies.
-
retrieveCancellationPolicyById
CancellationPolicy retrieveCancellationPolicyById(String cancellationPolicyId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves aCancellationPolicyby its id.- Parameters:
cancellationPolicyId- The Id of theCancellationPolicyto retrieve.contextInfo- Context information around sandbox and multitenant state.- Returns:
- The retrieved
CancellationPolicy
-
readUserSubscriptionSummary
UserSubscriptionSummary readUserSubscriptionSummary(String userRefType, String userRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Fetches aUserSubscriptionSummarycontaining information about a user's active and former subscriptions.- Parameters:
userRefType- The type of user referenceuserRef- The reference to a usercontextInfo- Context information around sandbox and multitenant state.- Returns:
- A
UserSubscriptionSummarycontaining information about a user's active and former subscriptions.
-
lockSubscription
Locks a subscription.- Parameters:
subscriptionId- The subscription ID to lock.- Returns:
- The status of the lock operation.
-
clearLock
Clears a lock for a subscription.- Parameters:
subscriptionId- The subscription ID to clear the lock for.- Returns:
- The status of the lock operation.
-