Class SubscriberAccountModel
- All Implemented Interfaces:
XMLMarshallable
Java class specifies a subscriber account, a master data that represents an end customer (subscriber) who want to use a digital service from a service provider;
The subscriber account includes a set of prepaid accounts with balances,
a set of information about of external (postpaid) accounts
and a set of credit limit balances which are debited when the customer uses services or credited when he makes refills.
A subscriber account is mandatory before to create a subscription (or a provider contract in the data model) for this end customer (subscriber).
A service provider company is the owner of a subscriber account. It owns also a pricing catalog that includes pricing elements that are the basis
for a business agreement (subscription, provider contract) between the service provider and its end customers.
The owner (service provider) of the subscriber account is the owner of a catalog.
All the subscriptions assigned to a subscriber account
are subscriptions of commercial offers defined by this owner.
Notes
- The couple {subscriber account code, owner (service provider)} must be unique in the SAP CC system.
- The identifier code for a prepaid account, an external account or a credit limit balance must be unique for one subscriber account.
- The same subscriber (end customer who holds a subscriber account) can have several subscriber accounts with the same owner (service provider) if the codes of the accounts are unique.
Caution
This data model is dedicated to the HCI technical interface that is relevant for implementing convergent charging services based on subscriptions.
Do not use this data model if your system landscape manages convergent charging services based on provider contracts created with the Web Services technical interface.
Tax settings can be defined for a subscriber account according to your business requirements.
Some additional information can be defined for a subscriber account by the client application you develop.
Additional information can be used to facilitate the management of the subscriber accounts in your CRM application or provisioning system.
Related Operations
CreateSubscriberAccountOpSearchSubscriberAccountOpModifySubscriberAccountOpDeleteSubscriberAccountOp
Additional Information
Consult the SAP CC Application Help about the master data related to the end customers:
- Subscriber accounts
- Prepaid account
- External (postpaid) account
- Credit limit balance
- Subscriptions, provider contracts
- See Also:
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="subscriberAccount">
<xs:complexType>
<xs:sequence>
<xs:element ref="taxInfo" minOccurs="0" maxOccurs="1"/> <!-- Tax settings for this subscriber account -->
<xs:element name="defaultChargedAccount" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element ref="prepaidAccount" minOccurs="0" maxOccurs="1"/>
<xs:element ref="externalAccount" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element ref="additionalInformation" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="prepaidAccount" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="externalAccount" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="creditLimitBalance" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="code" type="xs:string" use="required"/> <!-- is the identification code (or codename) of this account -->
<xs:attribute name="reference" type="xs:string"/> <!-- is the reference of this account -->
<xs:attribute name="description" type="xs:string"/> <!-- is the comprehensive description of this account -->
<xs:attribute name="serviceProvider" type="xs:string" use="required"/> <!-- refers to the contracting service provider: the value is the owner of the associated pricing catalog -->
<xs:attribute name="subscriber" type="xs:string" use="required"/> <!-- is the subscriber of this account -->
<xs:attribute name="prepaidBalanceTaxationType" default="taxExcluded">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="taxIncluded"/> <!-- postpaid receivable account -->
<xs:enumeration value="taxExcluded"/> <!-- postpaid payable account (for partner)-->
</xs:restriction>
</xs:simpleType> <!-- the subscriber balance is tax included/excluded -->
</xs:attribute>
</xs:complexType>
</xs:element>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe reserved name ofAdditional Info.static final Stringstatic final intType for postpaid tax included balance (default).static final intType for postpaid tax excluded balance. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a subscriber account; The new subscriber account has to be initialized invoking the methods.SubscriberAccountModel(String reference, String serviceProvider, String code, String subscriber, String description, TaxInfoModel taxInfo) Initializes a subscriber account with its owner, its code and its subscriberSubscriberAccountModel(String reference, String serviceProvider, String code, String subscriber, String description, TaxInfoModel taxInfo, int prepaidBalanceTaxationType) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(SubscriberAccountVisitor visitor) voidaddAdditionalInfo(AdditionalInfoModel additionalInfo) Adds a new additional info to this subscriber account; Do nothing if additionalInfo is null.voidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.voidaddCreditLimitBalance(CreditLimitBalanceModel creditLimitBalance) Adds a credit limit balance to this subscriber account; Do nothing if creditLimitBalance is null.voidaddExternalAccount(ExternalAccountModel externalAccount) Adds a new external account to this subscriber account; Do nothing if externalAccount is null.voidaddPrepaidAccount(PrepaidAccountModel prepaidAccount) Adds a new prepaid account to this subscriber account; Do nothing if prepaidAccount is null.getAdditionalInfo(int index) Returns the additional info stored in this subscriber account at the specified indexintReturns the number of additional info of this subscriber accountReturns the addtional info list of this subscriber accountgetCode()Returns the code of this subscriber accountgetCreditLimitBalance(int index) Returns the credit limit balance stored in this subscriber account at the specified indexReturns the external account stored in this subscriber account with the specified codeintReturns the number of credit limit balance of this subscriber accountReturns the credit limit balances of this subscriber accountReturns an iterator over the credit limit balances of this subscriber account; Note that the iterator returned by this method will throw an UnsupportedOperationException in response to its remove method.Returns the type of the default charged accountReturns a snapshot of the default credit limit balances; This list will not be updated if some default credit limit balances are added or removed to this subscriber account.Returns the default charged account as an external accountReturns the default charged account as a prepaid accountReturns a description about this subscriber account if already setgetExternalAccount(int index) Returns the external account stored in this subscriber account at the specified indexReturns the external account stored in this subscriber account with the specified codeintReturns the number of external account info of this subscriber accountReturns an iterator over the external accounts of this subscriber account; Note that the iterator returned by this method will throw an UnsupportedOperationException in response to its remove method.Returns the external accounts of this subscriber accountgetPrepaidAccount(int index) Returns the prepaid account stored in this subscriber account at the specified indexReturns the prepaid account stored in this subscriber account with the specified codeintReturns the number of prepaid account info of this subscriber accountReturns an iterator over the prepaid accounts of this subscriber account; Note that the iterator returned by this method will throw an UnsupportedOperationException in response to its remove method.Returns the prepaid accounts of this subscriber accountintDeprecated.Deprecated since version 2.0 of SAP CCReturns the reference of this subscriber accountReturns the contracting service provider, owner of this subscriber accountReturns the subscriber of this subscriber accountReturns tax information about this subscriber account if already setsvoidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.removeAdditionalInfo(int index) Removes the additional info at index position from this subscriber accountbooleanremoveAdditionalInfo(AdditionalInfoModel additionalInfo) Removes the specified additional info from this subscriber accountremoveCreditLimitBalance(int index) Removed the credit limit balance stored in this subscriber account at the specified indexbooleanremoveCreditLimitBalance(CreditLimitBalanceModel creditLimitBalance) Removes the specified credit limit balance from this subscriber accountremoveExternalAccount(int index) Removes the external account stored in this subscriber account at the specified indexbooleanremoveExternalAccount(ExternalAccountModel externalAccount) Removes the specified external account from this subscriber accountremovePrepaidAccount(int index) Removes the prepaid account stored in this subscriber account at the specified indexbooleanremovePrepaidAccount(PrepaidAccountModel prepaidAccount) Removes the specified prepaid account from this subscriber accountvoidsetAdditionalInfoList(AdditionalInfoModel[] infoList) Replaces the additional info list of this subscriber account by the specified onesvoidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidSets the code of this subscriber accountvoidsetCreditLimitBalances(CreditLimitBalanceModel[] creditLimitBalances) Replaces the credit limit balances of this subscriber account by the specified onesvoidSets the default charged account to this subscriber with an external account; The default charged account is added to the list of the external accounts.voidSets the default charged account to this subscriber with a prepaid account; The default charged account is added to the list of the prepaid accounts.voidsetDescription(String description) Sets the description about this subscriber accountvoidsetExternalAccounts(ExternalAccountModel[] accounts) Replaces the external accounts of this subscriber account by the specified onesvoidsetPrepaidAccounts(PrepaidAccountModel[] accounts) Replaces the prepaid accounts of this subscriber account by the specified onesvoidsetPrepaidBalanceTaxationType(int prepaidBalanceTaxationType) Deprecated.Deprecated since version 2.0 of SAP CCvoidsetReference(String reference) Sets the reference of this subscriber accountvoidsetServiceProvider(String serviceProvider) Sets the contracting service provider, owner of this subscriber account.voidsetSubscriber(String subscriber) Sets the subscriber of this subscriber accountvoidsetTaxInfo(TaxInfoModel taxInfo) Sets the tax information about this subscriber account
-
Field Details
-
TAX_EXCLUDED
public static final int TAX_EXCLUDEDType for postpaid tax included balance (default).- See Also:
-
TAX_INCLUDED
public static final int TAX_INCLUDEDType for postpaid tax excluded balance.- See Also:
-
SAP_CMA
The reserved name ofAdditional Info.- See Also:
-
TAG_NAME
- See Also:
-
-
Constructor Details
-
SubscriberAccountModel
public SubscriberAccountModel()Creates a subscriber account; The new subscriber account has to be initialized invoking the methods. -
SubscriberAccountModel
public SubscriberAccountModel(String reference, String serviceProvider, String code, String subscriber, String description, TaxInfoModel taxInfo) Initializes a subscriber account with its owner, its code and its subscriber- Parameters:
reference- The reference of this subscriber accountserviceProvider- The owner of this subscriber accountcode- The code of the subscriber accountsubscriber- The subscriber of the subscriber accountdescription- The description of the subscriber accounttaxInfo- The taxation information
-
SubscriberAccountModel
@Deprecated public SubscriberAccountModel(String reference, String serviceProvider, String code, String subscriber, String description, TaxInfoModel taxInfo, int prepaidBalanceTaxationType) Deprecated.Initializes a subscriber account with its owner, its code and its subscriber- Parameters:
reference- The reference of this subscriber accountserviceProvider- The owner of this subscriber accountcode- The code of the subscriber accountsubscriber- The subscriber of the subscriber accountdescription- The description of the subscriber accounttaxInfo- The taxation informationprepaidBalanceTaxationType- The prepaid balance is tax included or tax excluded
-
-
Method Details
-
getReference
Returns the reference of this subscriber account- Returns:
- A reference
-
setReference
Sets the reference of this subscriber account- Parameters:
reference- A reference
-
setServiceProvider
Sets the contracting service provider, owner of this subscriber account. It is theownerspecified in the assignedpricing catalogthat will be used to configure business agreements (contracts, subscriptions).- Parameters:
serviceProvider- The contracting service provider of this subscriber account (must not benull);
-
getServiceProvider
Returns the contracting service provider, owner of this subscriber account- Returns:
- The contracting service provider of this subscriber account is already set,
nullotherwise; It is the name of the pricing catalog (owned by the service provider) that will be used to configure business agreements (contracts, subscriptions).
-
setCode
Sets the code of this subscriber account- Parameters:
code- the code of this subscriber account (must not benull).
-
getCode
Returns the code of this subscriber account- Returns:
- The code of this subscriber account if already set,
nullotherwise.
-
setSubscriber
Sets the subscriber of this subscriber account- Parameters:
subscriber- The code of the subscriber account (must not benull).
-
getSubscriber
Returns the subscriber of this subscriber account- Returns:
- the subscriber of this subscriber account is already set,
nullotherwise.
-
getDescription
Returns a description about this subscriber account if already set- Returns:
- A description if exists,
nullotherwise.
-
setDescription
Sets the description about this subscriber account- Parameters:
description- The description to be added
-
getTaxInfo
Returns tax information about this subscriber account if already sets- Returns:
- A tax information settings
-
setTaxInfo
Sets the tax information about this subscriber account- Parameters:
taxInfo- The tax information settings to be added
-
getPrepaidBalanceTaxationType
Deprecated.Deprecated since version 2.0 of SAP CCReturns the prepaid balance taxation type of this subscriber account- Returns:
- A prepaid balance taxation type
-
setPrepaidBalanceTaxationType
Deprecated.Deprecated since version 2.0 of SAP CCSets the prepaid balance taxation type of this subscriber account- Parameters:
prepaidBalanceTaxationType- The prepaid balance taxation type of this subscriber- See Also:
-
setDefaultChargedAccount
Sets the default charged account to this subscriber with an external account; The default charged account is added to the list of the external accounts.- Parameters:
account- The default charged account
-
setDefaultChargedAccount
Sets the default charged account to this subscriber with a prepaid account; The default charged account is added to the list of the prepaid accounts.- Parameters:
account- The default charged account
-
getDefaultChargedAccountType
Returns the type of the default charged account- Returns:
PREPAID_ACCOUNT_TYPEif the default charged account is a prepaid account,EXTERNAL_ACCOUNT_TYPEif the default chagred account is an external account,NO_DEFAULTif the default charged account is not specified yet.
-
getDefaultExternalAccount
Returns the default charged account as an external account- Returns:
- The default external account if exists,
nullotherwise.
-
getDefaultPrepaidAccount
Returns the default charged account as a prepaid account- Returns:
- The default prepaid account if exists,
nullotherwise.
-
getDefaultCreditLimitBalanceSnapshot
Returns a snapshot of the default credit limit balances; This list will not be updated if some default credit limit balances are added or removed to this subscriber account. You need to invoke this method each time you want to be up to date.- Returns:
- A list of credit limit balances; The list is empty if no default credit limit balance is defined.
-
addAdditionalInfo
Adds a new additional info to this subscriber account; Do nothing if additionalInfo is null.- Parameters:
additionalInfo- The additional information to be added
-
removeAdditionalInfo
Removes the specified additional info from this subscriber account- Parameters:
additionalInfo- The additional information to be deleted- Returns:
trueif this subscriber account contains additionalInfo, false otherwise.
-
removeAdditionalInfo
Removes the additional info at index position from this subscriber account- Parameters:
index- The index of the additional info to be returned- Returns:
- The additional info removed at the specified index
- Throws:
IndexOutOfBoundsException- if the index is greater thangetAdditionalInfoCount()or negative.
-
getAdditionalInfoCount
public int getAdditionalInfoCount()Returns the number of additional info of this subscriber account- Returns:
- A positive value representing the number of additional info of this subscriber account, 0 if it has no additional info.
-
getAdditionalInfo
Returns the additional info stored in this subscriber account at the specified index- Parameters:
index- The index of the additional info to be returned- Returns:
- The additional info stored at the specified index
- Throws:
IndexOutOfBoundsException- if the index is greater thangetAdditionalInfoCount()or negative.
-
getAdditionalInfoList
Returns the addtional info list of this subscriber account- Returns:
- An array of additional information
-
setAdditionalInfoList
Replaces the additional info list of this subscriber account by the specified ones- Parameters:
infoList- The new additional info list
-
addPrepaidAccount
Adds a new prepaid account to this subscriber account; Do nothing if prepaidAccount is null.- Parameters:
prepaidAccount- The prepaid account to be added
-
removePrepaidAccount
Removes the specified prepaid account from this subscriber account- Parameters:
prepaidAccount- The prepaid account to be deleted- Returns:
- true if this subscriber account contains prepaidAccount, false otherwise.
-
removePrepaidAccount
Removes the prepaid account stored in this subscriber account at the specified index- Parameters:
index- The index of the prepaid account to be removed- Returns:
- The prepaid account removed at the specified index
- Throws:
IndexOutOfBoundsException- if the index is greater thangetPrepaidAccountCount()or negative.
-
getPrepaidAccountCount
public int getPrepaidAccountCount()Returns the number of prepaid account info of this subscriber account- Returns:
- A positive value representing the number of prepaid account of this subscriber account, 0 if it has no prepaid account.
-
getPrepaidAccount
Returns the prepaid account stored in this subscriber account at the specified index- Parameters:
index- The index of the prepaid account to be returned- Returns:
- The prepaid account stored at the specified index
- Throws:
IndexOutOfBoundsException- if the index is greater thangetPrepaidAccountCount()or negative.
-
getPrepaidAccountByCode
Returns the prepaid account stored in this subscriber account with the specified code- Parameters:
code- The code of the prepaid account to be returned- Returns:
- A prepaid account if exists, null otherwise.
-
getPrepaidAccountIterator
Returns an iterator over the prepaid accounts of this subscriber account; Note that the iterator returned by this method will throw an UnsupportedOperationException in response to its remove method.- Returns:
- An iterator
-
getPrepaidAccounts
Returns the prepaid accounts of this subscriber account- Returns:
- An array of prepaid account
-
setPrepaidAccounts
Replaces the prepaid accounts of this subscriber account by the specified ones- Parameters:
accounts- The new prepaid accounts
-
addExternalAccount
Adds a new external account to this subscriber account; Do nothing if externalAccount is null.- Parameters:
externalAccount- The external account to be added
-
removeExternalAccount
Removes the specified external account from this subscriber account- Parameters:
externalAccount- The external account to be deleted- Returns:
- true if this subscriber account contains externalAccount, false otherwise.
-
removeExternalAccount
Removes the external account stored in this subscriber account at the specified index- Parameters:
index- the index of the external account to be removed- Returns:
- The external account removed at the specified index
- Throws:
IndexOutOfBoundsException- if the index is greater thangetExternalAccountCount()or negative
-
getExternalAccountCount
public int getExternalAccountCount()Returns the number of external account info of this subscriber account- Returns:
- a positive value representing the number of external account of this subscriber account, 0 if it has no external account.
-
getExternalAccountByCode
Returns the external account stored in this subscriber account with the specified code- Parameters:
code- The code of the external account to be returned- Returns:
- an external account if exists, null otherwise.
-
getExternalAccount
Returns the external account stored in this subscriber account at the specified index- Parameters:
index- the index of the external account to be returned- Returns:
- the external account stored at the specified index
- Throws:
IndexOutOfBoundsException- if the index is greater thangetExternalAccountCount()or negative
-
getExternalAccountIterator
Returns an iterator over the external accounts of this subscriber account; Note that the iterator returned by this method will throw an UnsupportedOperationException in response to its remove method.- Returns:
- An iterator
-
getExternalAccounts
Returns the external accounts of this subscriber account- Returns:
- An array of external account
-
setExternalAccounts
Replaces the external accounts of this subscriber account by the specified ones- Parameters:
accounts- The new external accounts
-
addCreditLimitBalance
Adds a credit limit balance to this subscriber account; Do nothing if creditLimitBalance is null.- Parameters:
creditLimitBalance- The credit limit to be added
-
removeCreditLimitBalance
Removes the specified credit limit balance from this subscriber account- Parameters:
creditLimitBalance- The credit limit balance to be deleted- Returns:
- true if this subscriber account contains creditLimitBalance, false otherwise.
-
removeCreditLimitBalance
Removed the credit limit balance stored in this subscriber account at the specified index- Parameters:
index- The index of the credit limit balance to be removed- Returns:
- The credit limit balance removed at the specified index
- Throws:
IndexOutOfBoundsException- if the index is greater thangetCreditLimitBalanceCount()or negative.
-
getCreditLimitBalanceCount
public int getCreditLimitBalanceCount()Returns the number of credit limit balance of this subscriber account- Returns:
- A positive value representing the number of credit limit balance of this subscriber account, 0 if it has no credit limit balance.
-
getCreditLimitBalance
Returns the credit limit balance stored in this subscriber account at the specified index- Parameters:
index- The index of the credit limit balance to be returned- Returns:
- The credit limit balance stored at the specified index
- Throws:
IndexOutOfBoundsException- if the index is greater thangetCreditLimitBalanceCount()or negative.
-
getCreditLimitBalanceByCode
Returns the external account stored in this subscriber account with the specified code- Parameters:
code- The code of the external account to be returned- Returns:
- An external account if exists, null otherwise.
-
getCreditLimitIterator
Returns an iterator over the credit limit balances of this subscriber account; Note that the iterator returned by this method will throw an UnsupportedOperationException in response to its remove method.- Returns:
- An iterator
-
getCreditLimitBalances
Returns the credit limit balances of this subscriber account- Returns:
- An array of credit limit balance
-
setCreditLimitBalances
Replaces the credit limit balances of this subscriber account by the specified ones- Parameters:
creditLimitBalances- The new credit limit balances
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Specified by:
addChildin interfaceXMLMarshallable- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Specified by:
setAttributesin interfaceXMLMarshallable- Parameters:
atts- TheXML attributesof the current element
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Specified by:
addCharacterDatain interfaceXMLMarshallable- Parameters:
cData- The character data to be added
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Specified by:
marshalin interfaceXMLMarshallable- Parameters:
output- TheXML outputto marshal the object into
-
accept
public void accept(SubscriberAccountVisitor visitor) throws InvalidSubscriberAccountException, DisabledFeatureException
-