Interface TmaSubscriptionBaseService

All Known Implementing Classes:
DefaultTmaSubscriptionBaseService

public interface TmaSubscriptionBaseService
Service for operations related to the TmaSubscriptionBaseModel.
Since:
6.6
  • Method Details

    • getSubscriptionBases

      List<TmaSubscriptionBaseModel> getSubscriptionBases(String customerId)
      Gets the all subscription bases given a customer identifier.
      Parameters:
      customerId - the customerId
      Returns:
      the list of subscriptions
    • getSubscriptionBase

      TmaSubscriptionBaseModel getSubscriptionBase(String subscriberIdentity, String billingSystemId)
      Returns the TmaSubscriptionBaseModel identified by the a given subscriber identity and a given billing system id.
      Parameters:
      subscriberIdentity - unique identifier of the subscriber from the billing system
      billingSystemId - unique identifier of the billing system
      Returns:
      TmaSubscriptionBaseModel if any exists
    • getAllSubscriptionBases

      Set<TmaSubscriptionBaseModel> getAllSubscriptionBases()
      Returns:
      Set of all TmaSubscriptionBaseModels available in system.
    • createSubscriptionBase

      TmaSubscriptionBaseModel createSubscriptionBase(String subscriberIdentity, String billingSystemId, String billingAccountId)
      Creates a TmaSubscriptionBaseModel with given details.
      Parameters:
      subscriberIdentity - unique identifier of the subscriber from the billing system
      billingSystemId - unique identifier of the billing system
      billingAccountId - unique identifier for the billing account
      Returns:
      newly created TmaSubscriptionBaseModel
    • deleteSubscriptionBase

      void deleteSubscriptionBase(String subscriberIdentity, String billingSystemId)
      Deletes the TmaSubscriptionBaseModel and associated TmaSubscriptionAccessModel, TmaSubscribedProductModel identified by the given details.
      Parameters:
      subscriberIdentity - unique identifier of the subscriber for which the TmaSubscriptionBaseModel and dependencies should be deleted
      billingSystemId - unique identifier of the billing system
    • generateSubscriptionBase

      TmaSubscriptionBaseModel generateSubscriptionBase(String billingAccountId)
      generates a TmaSubscriptionBaseModel with given details.
      Parameters:
      billingAccountId - unique identifier for the billing account
      Returns:
      newly created TmaSubscriptionBaseModel
    • generateSubscriptionBase

      TmaSubscriptionBaseModel generateSubscriptionBase(String customerId, String billingAccountId, TmaAccessType accessType)
      Generates a new TmaSubscriptionBaseModel and associated TmaSubscriptionAccessModel for the given TmaAccessType
      Parameters:
      customerId - customer identifier
      billingAccountId - unique identifier for the billing account
      accessType - access type modifier
      Returns:
      newly created TmaSubscriptionBaseModel
    • getMainTariffProductCodeForSubscriptionBase

      String getMainTariffProductCodeForSubscriptionBase(TmaSubscriptionBaseModel subscriptionBaseModel)
      Determines the product code of the main tariff subscribed product for the given subscription base model
      Parameters:
      subscriptionBaseModel - the subscription base to be checked
      Returns:
      the product code of the main tariff subscribed product
    • getMainTariffSubscribedProductIdForSubscriptionBase

      String getMainTariffSubscribedProductIdForSubscriptionBase(TmaSubscriptionBaseModel subscriptionBaseModel)
      Determines the Subscribed Product Id of the main tariff subscribed product for the given subscription base model
      Parameters:
      subscriptionBaseModel - the subscription base to be checked
      Returns:
      the Subscribed Product Id of the main tariff subscribed product
    • groupSubscriptionsByBillingArrangementAndBpo

      Map<String,List<TmaSubscriptionBaseModel>> groupSubscriptionsByBillingArrangementAndBpo(List<TmaSubscriptionBaseModel> subscriptionBases)
      The list of TmaSubscriptionBaseModel given is grouped by billing agreement and BPO, obtaining a map of subscriptions. The key of the map is: - Combination of billing agreement id and BPO: for those subscriptions having the billing agreement and BPO attached - Billing agreement ID + 'NOBPO' + indexNo: for those subscriptions having billing agreement attached but no BPO At first the subscriptions are grouped by billing agreement. If a subscription has no billing agreement that subscription is not considered anymore. The list of subscriptions grouped by billing agreement is then grouped by BPO. Each list of subscription having the same billing agreement and same BPO will be added to the result map as an entry having the key determined as described above.
      Parameters:
      subscriptionBases - the list with subscriptions that will be processed
      Returns:
      the map grouping the subscription bases by billing agreement and BPO
    • getSubscriptionBaseByIdentity

      TmaSubscriptionBaseModel getSubscriptionBaseByIdentity(String subscriberIdentity)
      Return TmaSubscriptionBaseModel for given subscriptionBase.
      Parameters:
      subscriberIdentity - unique identifier of the subscriber from the billing system
      Returns:
      TmaSubscriptionBaseModel for given subscriberIdentity
    • getMainTariffSubscribedProductIdsForSubscriptionBases

      Set<String> getMainTariffSubscribedProductIdsForSubscriptionBases(List<TmaSubscriptionBaseModel> subscriptionBaseModelList)
      Determines the Subscribed Product Id of the main tariffs corresponding to the each of the subscription bases given.
      Parameters:
      subscriptionBaseModelList - the list of subscription bases
      Returns:
      the set of Subscribed Product Id's or empty list if the input data is empty
    • doesSubscriptionBaseExist

      boolean doesSubscriptionBaseExist(String subscriberIdentity)
      Checks if SubscriptionBase exist for given subscriberIdentity
      Parameters:
      subscriberIdentity - SubscriptionBase identifier
      Returns:
      true if TmaSubscriptionBaseModel exists for given subscriberIdentity else false