Class CreditLimitBalanceModel

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

public class CreditLimitBalanceModel extends Object implements XMLMarshallable
This Java class represents a credit limit balance defined in a subscriber account stored in customer master data owned by a service provider; A credit limit balance is a monetary counter associated to a currency and intended to limit the use of a marketable service for a time period.

A credit limie balance add one or more amount alerts to this credit limit balance.

See Also:

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="creditLimitBalance">
   <xs:complexType>
     <xs:sequence>
       <xs:element ref="amountAlert" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>   
     <xs:attribute name="code" type="xs:string" use="required"/> 
     <xs:attribute name="description" type="xs:string"/> 
     <xs:attribute name="currency" type="xs:string" use="required"/>
     <xs:attribute name="amount" type="xs:string" use="required"/>
     <xs:attribute name="creditLimit" type="xs:string"/>
     <xs:attribute name="isDefault" type="xs:boolean"/>
     <xs:attribute name="referenceDate" type="xs:dateTime"/>
     <xs:attribute name="resetRecurringDates" type="xs:string"/>
   </xs:complexType>
 </xs:element>

  • Constructor Details

    • CreditLimitBalanceModel

      public CreditLimitBalanceModel()
      Builds an empty credit limit balance.
    • CreditLimitBalanceModel

      public CreditLimitBalanceModel(String code, String description, BigDecimal amount, String currency, BigDecimal creditLimit)
      Builds an credit limit balance.
      Parameters:
      code - The identification code of the credit limit balance
      description - The description of the credit limit balance
      amount - The amount of the credit limit balance
      currency - The currency of the credit limit balance
      creditLimit - The credit limit amount of the credit limit balance
  • Method Details

    • getAmount

      public BigDecimal getAmount()
      Gets the amount of the credit limit balance.
      Returns:
      The amount of the credit limit balance
    • setAmount

      public void setAmount(BigDecimal amount)
      Sets the amount of the credit limit balance.
      Parameters:
      amount - The amount of the credit limit balance
    • getCode

      public String getCode()
      Gets the code of the credit limit balance.
      Returns:
      The code of the credit limit balance
    • setCode

      public void setCode(String code)
      Sets the code of the credit limit balance.
      Parameters:
      code - The code of the credit limit balance
    • getDescription

      public String getDescription()
      Gets the description of the credit limit balance.
      Returns:
      The description of the credit limit balance
    • setDescription

      public void setDescription(String description)
      Sets the description of the credit limit balance.
      Parameters:
      description - The description of the credit limit balance
    • getCreditLimit

      public BigDecimal getCreditLimit()
      Gets the credit limit amount of the credit limit balance.
      Returns:
      The credit limit amount of the credit limit balance
    • setCreditLimit

      public void setCreditLimit(BigDecimal creditLimit)
      Sets the credit limit amount of the credit limit balance.
      Parameters:
      creditLimit - The credit limit amount of the credit limit balance
    • getCurrencyCode

      public String getCurrencyCode()
      Gets the currency code of the credit limit balance.
      Returns:
      The currency code of the credit limit balance
    • setCurrencyCode

      public void setCurrencyCode(String currencyCode)
      Sets the currency code of the credit limit balance.
      Parameters:
      currencyCode - The currency code of the credit limit balance
    • getResetRecurringDate

      public RecurringDateModel getResetRecurringDate()
      Gets the reset recurring date of the credit limit balance.
      Returns:
      The reset recurring date of the credit limit balance
    • setResetRecurringDate

      public void setResetRecurringDate(RecurringDateModel resetRecurringDate)
      Sets the reset recurring date of the credit limit balance.
      Parameters:
      resetRecurringDate - The RecurringDateModel of the credit limit balance
    • getReferenceDate

      public Date getReferenceDate()
      Gets the reference date of the credit limit balance.
      Returns:
      The reference date of the credit limit balance
    • setReferenceDate

      public void setReferenceDate(Date referenceDate)
      Sets the reference date of the credit limit balance.
      Parameters:
      referenceDate - The reference date of the credit limit balance
    • isDefault

      public boolean isDefault()
      Tests if this credit limit balance is the default one.
      Returns:
      true if this credit limit balance is the default one, false otherwise
    • isDefault

      public final void isDefault(boolean isDefault)
      Sets this credit limit balance to be the default one.
      Parameters:
      isDefault - The boolean value to define if this credit limit balance is the default one
    • addAmountAlert

      public void addAmountAlert(AmountAlertModel alert)
      Adds a AmountAlertModel to this credit limit balance amount alerts list.
      Parameters:
      alert - The AmountAlertModel to be added
    • removeAmountAlert

      public boolean removeAmountAlert(AmountAlertModel alert)
      Removes a AmountAlertModel to this credit limit balance amount alerts list.
      Parameters:
      alert - The AmountAlertModel to be removed
      Returns:
      true if the alert is successfully removed, false otherwise
    • removeAmountAlert

      public AmountAlertModel removeAmountAlert(int index)
      Removes a AmountAlertModel at given index to this credit limit balance amount alerts list.
      Parameters:
      index - The index of the AmountAlertModel to be removed
      Returns:
      The removed AmountAlertModel
    • getAmountAlertCount

      public int getAmountAlertCount()
      Gets the size of this credit limit balance amount alerts list.
      Returns:
      The size of this credit limit balance amount alerts list
    • getAmountAlerts

      public AmountAlertModel[] getAmountAlerts()
      Gets this credit limit balance amount alerts list.
      Returns:
      This credit limit balance amount alerts list
    • getAmountAlertIterator

      public Iterator<AmountAlertModel> getAmountAlertIterator()
      Gets this credit limit balance amount alerts list iterator.
      Returns:
      This credit limit balance amount alerts list iterator
    • setAmountAlerts

      public void setAmountAlerts(AmountAlertModel[] alerts)
      Sets this credit limit balance amount alerts list.
      Parameters:
      alerts - The list of AmountAlertModel of this credit limit balance amount alerts list
    • getContext

      public RatingContextDescription getContext(ContextualNode child)
    • inheritedContext

      public RatingContextDescription inheritedContext()
    • 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
    • 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
    • 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