Package com.highdeal.pnr.hci
Class CreditLimitBalanceModel
java.lang.Object
com.highdeal.pnr.hci.CreditLimitBalanceModel
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionBuilds an empty credit limit balance.CreditLimitBalanceModel(String code, String description, BigDecimal amount, String currency, BigDecimal creditLimit) Builds an credit limit balance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAmountAlert(AmountAlertModel alert) Adds aAmountAlertModelto this credit limit balance amount alerts list.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.Gets the amount of the credit limit balance.intGets the size of this credit limit balance amount alerts list.Gets this credit limit balance amount alerts list iterator.Gets this credit limit balance amount alerts list.getCode()Gets the code of the credit limit balance.getContext(ContextualNode child) Gets the credit limit amount of the credit limit balance.Gets the currency code of the credit limit balance.Gets the description of the credit limit balance.Gets the reference date of the credit limit balance.Gets the reset recurring date of the credit limit balance.booleanTests if this credit limit balance is the default one.final voidisDefault(boolean isDefault) Sets this credit limit balance to be the default one.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.removeAmountAlert(int index) Removes aAmountAlertModelat given index to this credit limit balance amount alerts list.booleanRemoves aAmountAlertModelto this credit limit balance amount alerts list.voidsetAmount(BigDecimal amount) Sets the amount of the credit limit balance.voidsetAmountAlerts(AmountAlertModel[] alerts) Sets this credit limit balance amount alerts list.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidSets the code of the credit limit balance.voidsetCreditLimit(BigDecimal creditLimit) Sets the credit limit amount of the credit limit balance.voidsetCurrencyCode(String currencyCode) Sets the currency code of the credit limit balance.voidsetDescription(String description) Sets the description of the credit limit balance.voidsetReferenceDate(Date referenceDate) Sets the reference date of the credit limit balance.voidsetResetRecurringDate(RecurringDateModel resetRecurringDate) Sets the reset recurring date of the credit limit balance.
-
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 balancedescription- The description of the credit limit balanceamount- The amount of the credit limit balancecurrency- The currency of the credit limit balancecreditLimit- The credit limit amount of the credit limit balance
-
-
Method Details
-
getAmount
Gets the amount of the credit limit balance.- Returns:
- The amount of the credit limit balance
-
setAmount
Sets the amount of the credit limit balance.- Parameters:
amount- The amount of the credit limit balance
-
getCode
Gets the code of the credit limit balance.- Returns:
- The code of the credit limit balance
-
setCode
Sets the code of the credit limit balance.- Parameters:
code- The code of the credit limit balance
-
getDescription
Gets the description of the credit limit balance.- Returns:
- The description of the credit limit balance
-
setDescription
Sets the description of the credit limit balance.- Parameters:
description- The description of the credit limit balance
-
getCreditLimit
Gets the credit limit amount of the credit limit balance.- Returns:
- The credit limit amount of the credit limit balance
-
setCreditLimit
Sets the credit limit amount of the credit limit balance.- Parameters:
creditLimit- The credit limit amount of the credit limit balance
-
getCurrencyCode
Gets the currency code of the credit limit balance.- Returns:
- The currency code of the credit limit balance
-
setCurrencyCode
Sets the currency code of the credit limit balance.- Parameters:
currencyCode- The currency code of the credit limit balance
-
getResetRecurringDate
Gets the reset recurring date of the credit limit balance.- Returns:
- The reset recurring date of the credit limit balance
-
setResetRecurringDate
Sets the reset recurring date of the credit limit balance.- Parameters:
resetRecurringDate- TheRecurringDateModelof the credit limit balance
-
getReferenceDate
Gets the reference date of the credit limit balance.- Returns:
- The reference date of the credit limit balance
-
setReferenceDate
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:
trueif 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
Adds aAmountAlertModelto this credit limit balance amount alerts list.- Parameters:
alert- TheAmountAlertModelto be added
-
removeAmountAlert
Removes aAmountAlertModelto this credit limit balance amount alerts list.- Parameters:
alert- TheAmountAlertModelto be removed- Returns:
trueif the alert is successfully removed, false otherwise
-
removeAmountAlert
Removes aAmountAlertModelat given index to this credit limit balance amount alerts list.- Parameters:
index- The index of theAmountAlertModelto 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
Gets this credit limit balance amount alerts list.- Returns:
- This credit limit balance amount alerts list
-
getAmountAlertIterator
Gets this credit limit balance amount alerts list iterator.- Returns:
- This credit limit balance amount alerts list iterator
-
setAmountAlerts
Sets this credit limit balance amount alerts list.- Parameters:
alerts- The list ofAmountAlertModelof this credit limit balance amount alerts list
-
getContext
-
inheritedContext
-
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
-
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
-
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
-