Interface TmaSubscriptionBaseService
- All Known Implementing Classes:
DefaultTmaSubscriptionBaseService
public interface TmaSubscriptionBaseService
Service for operations related to the
TmaSubscriptionBaseModel.- Since:
- 6.6
-
Method Summary
Modifier and TypeMethodDescriptioncreateSubscriptionBase(String subscriberIdentity, String billingSystemId, String billingAccountId) Creates aTmaSubscriptionBaseModelwith given details.voiddeleteSubscriptionBase(String subscriberIdentity, String billingSystemId) Deletes theTmaSubscriptionBaseModeland associatedTmaSubscriptionAccessModel,TmaSubscribedProductModelidentified by the given details.booleandoesSubscriptionBaseExist(String subscriberIdentity) Checks if SubscriptionBase exist for given subscriberIdentitygenerateSubscriptionBase(String billingAccountId) generates aTmaSubscriptionBaseModelwith given details.generateSubscriptionBase(String customerId, String billingAccountId, TmaAccessType accessType) Generates a newTmaSubscriptionBaseModeland associatedTmaSubscriptionAccessModelfor the givenTmaAccessTypeRetrieves allTmaSubscriptionBaseModelsgetMainTariffProductCodeForSubscriptionBase(TmaSubscriptionBaseModel subscriptionBaseModel) Determines the product code of the main tariff subscribed product for the given subscription base modelgetMainTariffSubscribedProductIdForSubscriptionBase(TmaSubscriptionBaseModel subscriptionBaseModel) Determines the Subscribed Product Id of the main tariff subscribed product for the given subscription base modelgetMainTariffSubscribedProductIdsForSubscriptionBases(List<TmaSubscriptionBaseModel> subscriptionBaseModelList) Determines the Subscribed Product Id of the main tariffs corresponding to the each of the subscription bases given.getSubscriptionBase(String subscriberIdentity, String billingSystemId) Returns theTmaSubscriptionBaseModelidentified by the a given subscriber identity and a given billing system id.getSubscriptionBaseByIdentity(String subscriberIdentity) ReturnTmaSubscriptionBaseModelfor given subscriptionBase.getSubscriptionBases(String customerId) Gets the all subscription bases given a customer identifier.groupSubscriptionsByBillingArrangementAndBpo(List<TmaSubscriptionBaseModel> subscriptionBases) The list ofTmaSubscriptionBaseModelgiven is grouped by billing agreement and BPO, obtaining a map of subscriptions.
-
Method Details
-
getSubscriptionBases
Gets the all subscription bases given a customer identifier.- Parameters:
customerId- the customerId- Returns:
- the list of subscriptions
-
getSubscriptionBase
Returns theTmaSubscriptionBaseModelidentified by the a given subscriber identity and a given billing system id.- Parameters:
subscriberIdentity- unique identifier of the subscriber from the billing systembillingSystemId- unique identifier of the billing system- Returns:
TmaSubscriptionBaseModelif any exists
-
getAllSubscriptionBases
Set<TmaSubscriptionBaseModel> getAllSubscriptionBases()Retrieves allTmaSubscriptionBaseModels- Returns:
Setof allTmaSubscriptionBaseModels available in system.
-
createSubscriptionBase
TmaSubscriptionBaseModel createSubscriptionBase(String subscriberIdentity, String billingSystemId, String billingAccountId) Creates aTmaSubscriptionBaseModelwith given details.- Parameters:
subscriberIdentity- unique identifier of the subscriber from the billing systembillingSystemId- unique identifier of the billing systembillingAccountId- unique identifier for the billing account- Returns:
- newly created
TmaSubscriptionBaseModel
-
deleteSubscriptionBase
Deletes theTmaSubscriptionBaseModeland associatedTmaSubscriptionAccessModel,TmaSubscribedProductModelidentified by the given details.- Parameters:
subscriberIdentity- unique identifier of the subscriber for which theTmaSubscriptionBaseModeland dependencies should be deletedbillingSystemId- unique identifier of the billing system
-
generateSubscriptionBase
generates aTmaSubscriptionBaseModelwith 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 newTmaSubscriptionBaseModeland associatedTmaSubscriptionAccessModelfor the givenTmaAccessType- Parameters:
customerId- customer identifierbillingAccountId- unique identifier for the billing accountaccessType- access type modifier- Returns:
- newly created
TmaSubscriptionBaseModel
-
getMainTariffProductCodeForSubscriptionBase
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 ofTmaSubscriptionBaseModelgiven 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
ReturnTmaSubscriptionBaseModelfor 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
Checks if SubscriptionBase exist for given subscriberIdentity- Parameters:
subscriberIdentity- SubscriptionBase identifier- Returns:
- true if TmaSubscriptionBaseModel exists for given subscriberIdentity else false
-