Class SubscriberAccountModel

java.lang.Object
com.highdeal.pnr.hci.SubscriberAccountModel
All Implemented Interfaces:
XMLMarshallable

public class SubscriberAccountModel extends Object implements XMLMarshallable
This 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

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>

  • Field Details

  • 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 account
      serviceProvider - The owner of this subscriber account
      code - The code of the subscriber account
      subscriber - The subscriber of the subscriber account
      description - The description of the subscriber account
      taxInfo - 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 account
      serviceProvider - The owner of this subscriber account
      code - The code of the subscriber account
      subscriber - The subscriber of the subscriber account
      description - The description of the subscriber account
      taxInfo - The taxation information
      prepaidBalanceTaxationType - The prepaid balance is tax included or tax excluded
  • Method Details

    • getReference

      public String getReference()
      Returns the reference of this subscriber account
      Returns:
      A reference
    • setReference

      public void setReference(String reference)
      Sets the reference of this subscriber account
      Parameters:
      reference - A reference
    • setServiceProvider

      public void setServiceProvider(String serviceProvider)
      Sets the contracting service provider, owner of this subscriber account. It is the owner specified in the assigned pricing catalog that will be used to configure business agreements (contracts, subscriptions).
      Parameters:
      serviceProvider - The contracting service provider of this subscriber account (must not be null);
    • getServiceProvider

      public String getServiceProvider()
      Returns the contracting service provider, owner of this subscriber account
      Returns:
      The contracting service provider of this subscriber account is already set, null otherwise; It is the name of the pricing catalog (owned by the service provider) that will be used to configure business agreements (contracts, subscriptions).
    • setCode

      public void setCode(String code)
      Sets the code of this subscriber account
      Parameters:
      code - the code of this subscriber account (must not be null).
    • getCode

      public String getCode()
      Returns the code of this subscriber account
      Returns:
      The code of this subscriber account if already set, null otherwise.
    • setSubscriber

      public void setSubscriber(String subscriber)
      Sets the subscriber of this subscriber account
      Parameters:
      subscriber - The code of the subscriber account (must not be null).
    • getSubscriber

      public String getSubscriber()
      Returns the subscriber of this subscriber account
      Returns:
      the subscriber of this subscriber account is already set, null otherwise.
    • getDescription

      public String getDescription()
      Returns a description about this subscriber account if already set
      Returns:
      A description if exists, null otherwise.
    • setDescription

      public void setDescription(String description)
      Sets the description about this subscriber account
      Parameters:
      description - The description to be added
    • getTaxInfo

      public TaxInfoModel getTaxInfo()
      Returns tax information about this subscriber account if already sets
      Returns:
      A tax information settings
    • setTaxInfo

      public void setTaxInfo(TaxInfoModel taxInfo)
      Sets the tax information about this subscriber account
      Parameters:
      taxInfo - The tax information settings to be added
    • getPrepaidBalanceTaxationType

      @Deprecated public int getPrepaidBalanceTaxationType()
      Deprecated.
      Deprecated since version 2.0 of SAP CC
      Returns the prepaid balance taxation type of this subscriber account
      Returns:
      A prepaid balance taxation type
    • setPrepaidBalanceTaxationType

      @Deprecated public void setPrepaidBalanceTaxationType(int prepaidBalanceTaxationType)
      Deprecated.
      Deprecated since version 2.0 of SAP CC
      Sets the prepaid balance taxation type of this subscriber account
      Parameters:
      prepaidBalanceTaxationType - The prepaid balance taxation type of this subscriber
      See Also:
    • setDefaultChargedAccount

      public void setDefaultChargedAccount(ExternalAccountModel account)
      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

      public void setDefaultChargedAccount(PrepaidAccountModel account)
      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

      public SubscriberAccountModel.DefaultChargedAccountType getDefaultChargedAccountType()
      Returns the type of the default charged account
      Returns:
      PREPAID_ACCOUNT_TYPE if the default charged account is a prepaid account, EXTERNAL_ACCOUNT_TYPE if the default chagred account is an external account, NO_DEFAULT if the default charged account is not specified yet.
    • getDefaultExternalAccount

      public ExternalAccountModel getDefaultExternalAccount()
      Returns the default charged account as an external account
      Returns:
      The default external account if exists, null otherwise.
    • getDefaultPrepaidAccount

      public PrepaidAccountModel getDefaultPrepaidAccount()
      Returns the default charged account as a prepaid account
      Returns:
      The default prepaid account if exists, null otherwise.
    • getDefaultCreditLimitBalanceSnapshot

      public List<CreditLimitBalanceModel> 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

      public void addAdditionalInfo(AdditionalInfoModel additionalInfo)
      Adds a new additional info to this subscriber account; Do nothing if additionalInfo is null.
      Parameters:
      additionalInfo - The additional information to be added
    • removeAdditionalInfo

      public boolean removeAdditionalInfo(AdditionalInfoModel additionalInfo)
      Removes the specified additional info from this subscriber account
      Parameters:
      additionalInfo - The additional information to be deleted
      Returns:
      true if this subscriber account contains additionalInfo, false otherwise.
    • removeAdditionalInfo

      public AdditionalInfoModel removeAdditionalInfo(int index)
      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 than getAdditionalInfoCount() 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

      public AdditionalInfoModel getAdditionalInfo(int index)
      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 than getAdditionalInfoCount() or negative.
    • getAdditionalInfoList

      public AdditionalInfoModel[] getAdditionalInfoList()
      Returns the addtional info list of this subscriber account
      Returns:
      An array of additional information
    • setAdditionalInfoList

      public void setAdditionalInfoList(AdditionalInfoModel[] infoList)
      Replaces the additional info list of this subscriber account by the specified ones
      Parameters:
      infoList - The new additional info list
    • addPrepaidAccount

      public void addPrepaidAccount(PrepaidAccountModel prepaidAccount)
      Adds a new prepaid account to this subscriber account; Do nothing if prepaidAccount is null.
      Parameters:
      prepaidAccount - The prepaid account to be added
    • removePrepaidAccount

      public boolean removePrepaidAccount(PrepaidAccountModel prepaidAccount)
      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

      public PrepaidAccountModel removePrepaidAccount(int index)
      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 than getPrepaidAccountCount() 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

      public PrepaidAccountModel getPrepaidAccount(int index)
      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 than getPrepaidAccountCount() or negative.
    • getPrepaidAccountByCode

      public PrepaidAccountModel getPrepaidAccountByCode(String code)
      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

      public Iterator<PrepaidAccountModel> 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

      public PrepaidAccountModel[] getPrepaidAccounts()
      Returns the prepaid accounts of this subscriber account
      Returns:
      An array of prepaid account
    • setPrepaidAccounts

      public void setPrepaidAccounts(PrepaidAccountModel[] accounts)
      Replaces the prepaid accounts of this subscriber account by the specified ones
      Parameters:
      accounts - The new prepaid accounts
    • addExternalAccount

      public void addExternalAccount(ExternalAccountModel externalAccount)
      Adds a new external account to this subscriber account; Do nothing if externalAccount is null.
      Parameters:
      externalAccount - The external account to be added
    • removeExternalAccount

      public boolean removeExternalAccount(ExternalAccountModel externalAccount)
      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

      public ExternalAccountModel removeExternalAccount(int index)
      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 than getExternalAccountCount() 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

      public ExternalAccountModel getExternalAccountByCode(String code)
      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

      public ExternalAccountModel getExternalAccount(int index)
      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 than getExternalAccountCount() or negative
    • getExternalAccountIterator

      public Iterator<ExternalAccountModel> 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

      public ExternalAccountModel[] getExternalAccounts()
      Returns the external accounts of this subscriber account
      Returns:
      An array of external account
    • setExternalAccounts

      public void setExternalAccounts(ExternalAccountModel[] accounts)
      Replaces the external accounts of this subscriber account by the specified ones
      Parameters:
      accounts - The new external accounts
    • addCreditLimitBalance

      public void addCreditLimitBalance(CreditLimitBalanceModel creditLimitBalance)
      Adds a credit limit balance to this subscriber account; Do nothing if creditLimitBalance is null.
      Parameters:
      creditLimitBalance - The credit limit to be added
    • removeCreditLimitBalance

      public boolean removeCreditLimitBalance(CreditLimitBalanceModel creditLimitBalance)
      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

      public CreditLimitBalanceModel removeCreditLimitBalance(int index)
      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 than getCreditLimitBalanceCount() 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

      public CreditLimitBalanceModel getCreditLimitBalance(int index)
      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 than getCreditLimitBalanceCount() or negative.
    • getCreditLimitBalanceByCode

      public CreditLimitBalanceModel getCreditLimitBalanceByCode(String code)
      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

      public Iterator<CreditLimitBalanceModel> 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

      public CreditLimitBalanceModel[] getCreditLimitBalances()
      Returns the credit limit balances of this subscriber account
      Returns:
      An array of credit limit balance
    • setCreditLimitBalances

      public void setCreditLimitBalances(CreditLimitBalanceModel[] creditLimitBalances)
      Replaces the credit limit balances of this subscriber account by the specified ones
      Parameters:
      creditLimitBalances - The new credit limit balances
    • addChild

      public void addChild(String tagName, XMLMarshallable child)
      Description copied from interface: XMLMarshallable
      Adds a child to the object, the child representing the marshallable object which must be added to the element.
      Specified by:
      addChild in interface XMLMarshallable
      Parameters:
      tagName - The name of tag for the child
      child - The child to be added
    • setAttributes

      public void setAttributes(XMLAttributes atts)
      Description copied from interface: XMLMarshallable
      Sets the attributes of the XML representation of the element being processed.
      Specified by:
      setAttributes in interface XMLMarshallable
      Parameters:
      atts - The XML attributes of the current element
    • addCharacterData

      public void addCharacterData(String cData)
      Description copied from interface: XMLMarshallable
      Adds character data to the content element.
      Specified by:
      addCharacterData in interface XMLMarshallable
      Parameters:
      cData - The character data to be added
    • marshal

      public void marshal(XMLOutputter output)
      Description copied from interface: XMLMarshallable
      Gives an XML representation of this object, including its children.
      Specified by:
      marshal in interface XMLMarshallable
      Parameters:
      output - The XML output to marshal the object into
    • accept

      Throws:
      InvalidSubscriberAccountException
      DisabledFeatureException