Interface TmaSubscriptionBaseService

    • Method Detail

      • getSubscriptionBases

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

        TmaSubscriptionBaseModel getSubscriptionBase​(java.lang.String subscriberIdentity,
                                                     java.lang.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
      • createSubscriptionBase

        TmaSubscriptionBaseModel createSubscriptionBase​(java.lang.String subscriberIdentity,
                                                        java.lang.String billingSystemId,
                                                        java.lang.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
      • getMainTariffProductCodeForSubscriptionBase

        java.lang.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

        java.lang.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

        java.util.Map<java.lang.String,​java.util.List<TmaSubscriptionBaseModel>> groupSubscriptionsByBillingArrangementAndBpo​(java.util.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​(java.lang.String subscriberIdentity)
        Return TmaSubscriptionBaseModel for given subscriptionBase.
        Parameters:
        subscriberIdentity - unique identifier of the subscriber from the billing system
        Returns:
        TmaSubscriptionBaseModel for given subscriberIdentity
      • getMainTariffSubscribedProductIdsForSubscriptionBases

        java.util.Set<java.lang.String> getMainTariffSubscribedProductIdsForSubscriptionBases​(java.util.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