Interface TmaSubscribedProductFacade
- All Known Implementing Classes:
DefaultTmaSubscribedProductFacade
public interface TmaSubscribedProductFacade
Facade gathering
TmaSubscribedProductData related operations.- Since:
- 6.6
-
Method Summary
Modifier and TypeMethodDescriptioncreateBillingActivityData(String subscriptionId) Creates the Subscription Billing data.createSubscribedProduct(TmaSubscribedProductData subscribedProductSource) Creates and persists a Subscribed Product.voiddeleteSubscribedProduct(String billingSystemId, String billingSubscriptionId) Deletes the Subscribed Product identified by billingSystemId and billingSubscriptionId.getCompatibleAddonsForSubscriberIdentity(String subscriberIdentity) Returns a list of possible compatible addon products for current user's subscription base.getServiceUsageUpSellProducts(String subscriberIdentity, String billingSystemId) Returns a list of possible up sell products based on current user's subscription service usage .getServiceUsageUpSellProductsWithSubscriberIdentity(String subscriberIdentity) Returns a list of possible up sell products based on current user's subscription service usage .getSubscribedProducts(String subscriberIdentity, String billingSystemId) RetrievingTmaSubscribedProductDatas for a given subscriberIdentity and billingSystemId.getSubscriptionAccessByPrincipalAndSubscriptionBase(String billingSystemId, String subscriberIdentity) Returns the access type of current user's subscription base.getSubscriptionBaseProductWithAvgValues(String subscriberIdentity, String subscribedProductId) Returns all subscription base services for subscription base service Id and subscriberIdentity.getSubscriptionBaseServices(String subscriberIdentity, String billingSystemId) Returns all subscription base services for the current user.getSubscriptionBaseServicesWithAvgValues(String subscriberIdentity, String billingSystemId) Returns all subscription base services for the current user.getSubscriptionCompatibleAddons(String subscriberIdentity, String billingSystemId) Returns a list of possible compatible addon products for current user's subscription base.Returns the relevant list of TmaSubscribedProductData for logged in usergetSubscriptionsById(String subscriptionId) Returns the TmaSubscribedProductData for given idgetSubscriptionServiceEndDate(String frequencyCode, Integer contractDuration, Date startDate) Get the Subscription End date .getSubscriptionsForPaymentMethod(String paymentMethodId) Returns the List of TmaSubscribedProductData for given idgetSubscriptionTermAndPrice(ProductData productData) Returns ProductData with updated price plan subscription term .getUpsellingOptionsForSubscription(String productCode) Returns a list of possible upgrade options for the given subscription product.getUpsellSubscribedProductForIdentity(String subscriberIdentity) Returns compatible upsell subscription product data.booleanisAddonProduct(ProductModel product) Returns true if product belongs to addon category .booleanisServicePlan(ProductModel product) Returns true if product belongs to plan category .booleanisSubscriptionProduct(ProductModel product) Returns true if product type of Subscription Product .replacePaymentMethod(String subscriptionId, String paymentMethodId) Updates the Subscribed Product with the specified subscriptionIdupdateSubscribedProduct(String billingSystemId, String billingSubscriptionId, TmaSubscribedProductData subscribedProductData) Updates the Subscribed Product with the specifiedTmaSubscribedProductData.upsellSubscriptionProductData(String subscriberIdentity, String billingSystemId) Returns compatible upsell subscription product data.
-
Method Details
-
createSubscribedProduct
Creates and persists a Subscribed Product.- Parameters:
subscribedProductSource- Subscribed Product to be persisted- Returns:
- newly created Subscribed Product
-
updateSubscribedProduct
TmaSubscribedProductData updateSubscribedProduct(String billingSystemId, String billingSubscriptionId, TmaSubscribedProductData subscribedProductData) Updates the Subscribed Product with the specifiedTmaSubscribedProductData.- Parameters:
billingSystemId- identifier of the billing systembillingSubscriptionId- identifier for existing Subscribed ProductsubscribedProductData- data used to update the Subscribed Product- Returns:
- the updated Subscribed Product
-
replacePaymentMethod
Updates the Subscribed Product with the specified subscriptionId- Parameters:
subscriptionId- identifier of the subscriptionpaymentMethodId- identifier for merchant subscription on credit card- Returns:
- the updated Subscribed Product
-
deleteSubscribedProduct
Deletes the Subscribed Product identified by billingSystemId and billingSubscriptionId.- Parameters:
billingSystemId- identifier of the billing systembillingSubscriptionId- identifier of the billing subscription
-
getSubscriptions
Map<TmaSubscriptionAccessData,Set<TmaSubscribedProductData>> getSubscriptions() throws de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeExceptionReturns the relevant list of TmaSubscribedProductData for logged in user- Returns:
- the Map<TmaSubscriptionAccessData, Set
> containing subscription related data - Throws:
de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeException
-
getSubscriptionsById
Returns the TmaSubscribedProductData for given id- Parameters:
subscriptionId- identifier of the subscription- Returns:
- the TmaSubscribedProductData containing subscription related data
-
getSubscribedProducts
List<TmaSubscribedProductData> getSubscribedProducts(String subscriberIdentity, String billingSystemId) RetrievingTmaSubscribedProductDatas for a given subscriberIdentity and billingSystemId.- Parameters:
subscriberIdentity- identifier of a SubscribedProductbillingSystemId- identifier of a SubscribedProduct- Returns:
TmaSubscribedProductDatas belonging to theSubscriptionBaseidentified by the given parameters.
-
getSubscriptionsForPaymentMethod
Returns the List of TmaSubscribedProductData for given id- Parameters:
paymentMethodId- paymentMethodId of the subscription- Returns:
- the List of TmaSubscribedProductData containing subscription related data which has given paymentMethodId
-
getUpsellingOptionsForSubscription
Returns a list of possible upgrade options for the given subscription product.- Parameters:
productCode- the code of the product- Returns:
ListofProductData
-
getSubscriptionBaseServices
Collection<TmaSubscribedProductModel> getSubscriptionBaseServices(String subscriberIdentity, String billingSystemId) throws de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeException Returns all subscription base services for the current user.- Parameters:
billingSystemId- identifier of the billing systemsubscriberIdentity- identifier of the subscriber- Returns:
Collection<TmaSubscribedProductModel> the current user's subscriptionBase- Throws:
de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeException- for exception thrown by this method
-
getSubscriptionBaseServicesWithAvgValues
Map<TmaSubscribedProductData,Set<TmaAverageServiceUsageData>> getSubscriptionBaseServicesWithAvgValues(String subscriberIdentity, String billingSystemId) throws de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeException Returns all subscription base services for the current user.- Parameters:
billingSystemId- identifier of the billing systemsubscriberIdentity- identifier of the subscriber- Returns:
Collection<, @link Collection{@link TmaAverageServiceUsageData} >the current user's subscriptionBase- Throws:
de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeException- for exception thrown by this method
-
getSubscriptionAccessByPrincipalAndSubscriptionBase
String getSubscriptionAccessByPrincipalAndSubscriptionBase(String billingSystemId, String subscriberIdentity) Returns the access type of current user's subscription base.- Parameters:
billingSystemId- identifier of the billing systemsubscriberIdentity- identifier of the subscriber- Returns:
- Access type as
String
-
getSubscriptionCompatibleAddons
Set<ProductData> getSubscriptionCompatibleAddons(String subscriberIdentity, String billingSystemId) throws de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeException Returns a list of possible compatible addon products for current user's subscription base.- Parameters:
subscriberIdentity- the id of the subscription BasebillingSystemId- identifier of the billing system- Returns:
SetofProductDatareturns product data- Throws:
de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeException- for exception throw by this method
-
upsellSubscriptionProductData
Returns compatible upsell subscription product data.- Parameters:
subscriberIdentity- identifier of the subscriberbillingSystemId- identifier of the billing system- Returns:
- Product data
-
createBillingActivityData
List<SubscriptionBillingData> createBillingActivityData(String subscriptionId) throws de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeException Creates the Subscription Billing data.- Parameters:
subscriptionId- id for active subscription- Returns:
ListofSubscriptionBillingData- Throws:
de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeException- for exception throw by this method
-
getSubscriptionServiceEndDate
Get the Subscription End date .- Parameters:
frequencyCode- Code forTermOfServiceFrequencycontractDuration- Duration of Contract of the ServicestartDate- Start date of Contract of the Service- Returns:
- the End Date of the Service
-
getServiceUsageUpSellProducts
Set<ProductData> getServiceUsageUpSellProducts(String subscriberIdentity, String billingSystemId) throws de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeException Returns a list of possible up sell products based on current user's subscription service usage .- Parameters:
subscriberIdentity- the id of the subscription BasebillingSystemId- identifier of the billing system- Returns:
SetofProductDatareturns product data- Throws:
de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeException- for exception throw by this method
-
isAddonProduct
Returns true if product belongs to addon category .- Parameters:
product- ProductModel instance- Returns:
booleanreturns true if product belongs to addon category else false
-
isSubscriptionProduct
Returns true if product type of Subscription Product .- Parameters:
product- ProductModel instance- Returns:
booleanreturns true if product is of type Subscription Product else false
-
getSubscriptionTermAndPrice
Returns ProductData with updated price plan subscription term .- Parameters:
productData- ProdcutData instance- Returns:
ProductDatareturns ProdcutData with updated price plan subscription term
-
getSubscriptionBaseProductWithAvgValues
Map<TmaSubscribedProductData,Set<TmaAverageServiceUsageData>> getSubscriptionBaseProductWithAvgValues(String subscriberIdentity, String subscribedProductId) throws de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeException Returns all subscription base services for subscription base service Id and subscriberIdentity.- Parameters:
subscriberIdentity- identifier of the subscribersubscribedProductId- subscription base service Id- Returns:
Collection<, @link Collection{@link TmaAverageServiceUsageData} >the current user's subscriptionBase- Throws:
de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeException- for exception thrown by this method
-
getUpsellSubscribedProductForIdentity
Returns compatible upsell subscription product data.- Parameters:
subscriberIdentity- identifier of the subscriber- Returns:
- Product data
-
getCompatibleAddonsForSubscriberIdentity
Set<ProductData> getCompatibleAddonsForSubscriberIdentity(String subscriberIdentity) throws de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeException Returns a list of possible compatible addon products for current user's subscription base.- Parameters:
subscriberIdentity- the id of the subscription Base- Returns:
SetofProductDatareturns product data- Throws:
de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeException- for exception throw by this method
-
getServiceUsageUpSellProductsWithSubscriberIdentity
Set<ProductData> getServiceUsageUpSellProductsWithSubscriberIdentity(String subscriberIdentity) throws de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeException Returns a list of possible up sell products based on current user's subscription service usage .- Parameters:
subscriberIdentity- the id of the subscription Base- Returns:
SetofProductDatareturns product data- Throws:
de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeException- for exception throw by this method
-
isServicePlan
Returns true if product belongs to plan category .- Parameters:
product- ProductModel instance- Returns:
booleanreturns true if product belongs to plan category else false
-