Interface TmaSubscriptionBaseService
-
- All Known Implementing Classes:
DefaultTmaSubscriptionBaseService
public interface TmaSubscriptionBaseServiceService for operations related to theTmaSubscriptionBaseModel.- Since:
- 6.6
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TmaSubscriptionBaseModelcreateSubscriptionBase(java.lang.String subscriberIdentity, java.lang.String billingSystemId, java.lang.String billingAccountId)Creates aTmaSubscriptionBaseModelwith given details.voiddeleteSubscriptionBase(java.lang.String subscriberIdentity, java.lang.String billingSystemId)Deletes theTmaSubscriptionBaseModeland associatedTmaSubscriptionAccessModel,TmaSubscribedProductModelidentified by the given details.TmaSubscriptionBaseModelgenerateSubscriptionBase(java.lang.String billingAccountId)generates aTmaSubscriptionBaseModelwith given details.TmaSubscriptionBaseModelgenerateSubscriptionBase(java.lang.String customerId, java.lang.String billingAccountId, TmaAccessType accessType)Generates a newTmaSubscriptionBaseModeland associatedTmaSubscriptionAccessModelfor the givenTmaAccessTypejava.util.Set<TmaSubscriptionBaseModel>getAllSubscriptionBases()Retrieves allTmaSubscriptionBaseModelsjava.lang.StringgetMainTariffProductCodeForSubscriptionBase(TmaSubscriptionBaseModel subscriptionBaseModel)Determines the product code of the main tariff subscribed product for the given subscription base modeljava.lang.StringgetMainTariffSubscribedProductIdForSubscriptionBase(TmaSubscriptionBaseModel subscriptionBaseModel)Determines the Subscribed Product Id of the main tariff subscribed product for the given subscription base modeljava.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.TmaSubscriptionBaseModelgetSubscriptionBase(java.lang.String subscriberIdentity, java.lang.String billingSystemId)Returns theTmaSubscriptionBaseModelidentified by the a given subscriber identity and a given billing system id.TmaSubscriptionBaseModelgetSubscriptionBaseByIdentity(java.lang.String subscriberIdentity)ReturnTmaSubscriptionBaseModelfor given subscriptionBase.java.util.List<TmaSubscriptionBaseModel>getSubscriptionBases(java.lang.String customerId)Gets the all subscription bases given a customer identifier.java.util.Map<java.lang.String,java.util.List<TmaSubscriptionBaseModel>>groupSubscriptionsByBillingArrangementAndBpo(java.util.List<TmaSubscriptionBaseModel> subscriptionBases)The list ofTmaSubscriptionBaseModelgiven is grouped by billing agreement and BPO, obtaining a map of subscriptions.
-
-
-
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 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
java.util.Set<TmaSubscriptionBaseModel> getAllSubscriptionBases()
Retrieves allTmaSubscriptionBaseModels- Returns:
Setof allTmaSubscriptionBaseModels available in system.
-
createSubscriptionBase
TmaSubscriptionBaseModel createSubscriptionBase(java.lang.String subscriberIdentity, java.lang.String billingSystemId, java.lang.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
void deleteSubscriptionBase(java.lang.String subscriberIdentity, java.lang.String billingSystemId)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
TmaSubscriptionBaseModel generateSubscriptionBase(java.lang.String billingAccountId)
generates aTmaSubscriptionBaseModelwith given details.- Parameters:
billingAccountId- unique identifier for the billing account- Returns:
- newly created
TmaSubscriptionBaseModel
-
generateSubscriptionBase
TmaSubscriptionBaseModel generateSubscriptionBase(java.lang.String customerId, java.lang.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
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 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
TmaSubscriptionBaseModel getSubscriptionBaseByIdentity(java.lang.String subscriberIdentity)
ReturnTmaSubscriptionBaseModelfor 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
-
-