Interface TmaSubscribedProductFacade

All Known Implementing Classes:
DefaultTmaSubscribedProductFacade

public interface TmaSubscribedProductFacade
Facade gathering TmaSubscribedProductData related operations.
Since:
6.6
  • Method Details

    • createSubscribedProduct

      TmaSubscribedProductData createSubscribedProduct(TmaSubscribedProductData subscribedProductSource)
      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 specified TmaSubscribedProductData.
      Parameters:
      billingSystemId - identifier of the billing system
      billingSubscriptionId - identifier for existing Subscribed Product
      subscribedProductData - data used to update the Subscribed Product
      Returns:
      the updated Subscribed Product
    • replacePaymentMethod

      TmaSubscribedProductData replacePaymentMethod(String subscriptionId, String paymentMethodId)
      Updates the Subscribed Product with the specified subscriptionId
      Parameters:
      subscriptionId - identifier of the subscription
      paymentMethodId - identifier for merchant subscription on credit card
      Returns:
      the updated Subscribed Product
    • deleteSubscribedProduct

      void deleteSubscribedProduct(String billingSystemId, String billingSubscriptionId)
      Deletes the Subscribed Product identified by billingSystemId and billingSubscriptionId.
      Parameters:
      billingSystemId - identifier of the billing system
      billingSubscriptionId - identifier of the billing subscription
    • getSubscriptions

      Map<TmaSubscriptionAccessData,Set<TmaSubscribedProductData>> getSubscriptions() throws de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeException
      Returns 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

      TmaSubscribedProductData getSubscriptionsById(String subscriptionId)
      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)
      Retrieving TmaSubscribedProductDatas for a given subscriberIdentity and billingSystemId.
      Parameters:
      subscriberIdentity - identifier of a SubscribedProduct
      billingSystemId - identifier of a SubscribedProduct
      Returns:
      TmaSubscribedProductDatas belonging to the SubscriptionBase identified by the given parameters.
    • getSubscriptionsForPaymentMethod

      List<TmaSubscribedProductData> getSubscriptionsForPaymentMethod(String paymentMethodId)
      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

      List<ProductData> getUpsellingOptionsForSubscription(String productCode)
      Returns a list of possible upgrade options for the given subscription product.
      Parameters:
      productCode - the code of the product
      Returns:
      List of ProductData
    • 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 system
      subscriberIdentity - 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 system
      subscriberIdentity - 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 system
      subscriberIdentity - 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 Base
      billingSystemId - identifier of the billing system
      Returns:
      Set of ProductData returns product data
      Throws:
      de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeException - for exception throw by this method
    • upsellSubscriptionProductData

      ProductData upsellSubscriptionProductData(String subscriberIdentity, String billingSystemId)
      Returns compatible upsell subscription product data.
      Parameters:
      subscriberIdentity - identifier of the subscriber
      billingSystemId - 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:
      List of SubscriptionBillingData
      Throws:
      de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeException - for exception throw by this method
    • getSubscriptionServiceEndDate

      Date getSubscriptionServiceEndDate(String frequencyCode, Integer contractDuration, Date startDate)
      Get the Subscription End date .
      Parameters:
      frequencyCode - Code for TermOfServiceFrequency
      contractDuration - Duration of Contract of the Service
      startDate - 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 Base
      billingSystemId - identifier of the billing system
      Returns:
      Set of ProductData returns product data
      Throws:
      de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeException - for exception throw by this method
    • isAddonProduct

      boolean isAddonProduct(ProductModel product)
      Returns true if product belongs to addon category .
      Parameters:
      product - ProductModel instance
      Returns:
      boolean returns true if product belongs to addon category else false
    • isSubscriptionProduct

      boolean isSubscriptionProduct(ProductModel product)
      Returns true if product type of Subscription Product .
      Parameters:
      product - ProductModel instance
      Returns:
      boolean returns true if product is of type Subscription Product else false
    • getSubscriptionTermAndPrice

      ProductData getSubscriptionTermAndPrice(ProductData productData)
      Returns ProductData with updated price plan subscription term .
      Parameters:
      productData - ProdcutData instance
      Returns:
      ProductData returns 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 subscriber
      subscribedProductId - 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

      ProductData getUpsellSubscribedProductForIdentity(String subscriberIdentity)
      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:
      Set of ProductData returns 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:
      Set of ProductData returns product data
      Throws:
      de.hybris.platform.subscriptionfacades.exceptions.SubscriptionFacadeException - for exception throw by this method
    • isServicePlan

      boolean isServicePlan(ProductModel product)
      Returns true if product belongs to plan category .
      Parameters:
      product - ProductModel instance
      Returns:
      boolean returns true if product belongs to plan category else false