public interface RemainingBalance extends GroupedAvp
7.2.133 Remaining-Balance AVP The Remaining-Balance AVP (AVPcode 2021) is of type Grouped and provides information about the remaining account balance of the subscriber. It has the following ABNF grammar: Remaining-Balance ::= < AVP Header: 2021 > { Unit-Value } { Currency-Code }Note:
FLAG_RULE_MAY, FLAG_RULE_MUST, FLAG_RULE_MUSTNOT
Modifier and Type | Method and Description |
---|---|
long |
getCurrencyCode()
Returns the value of the Currency-Code AVP, of type Unsigned32.
|
DiameterAvp[] |
getExtensionAvps()
Returns the set of extension AVPs.
|
UnitValue |
getUnitValue()
Returns the value of the Unit-Value AVP, of type Grouped.
|
boolean |
hasCurrencyCode()
Returns true if the Currency-Code AVP is present in the Remaining-Balance AVP.
|
boolean |
hasUnitValue()
Returns true if the Unit-Value AVP is present in the Remaining-Balance AVP.
|
void |
removeCurrencyCode()
Removes the Currency-Code AVP from the Remaining-Balance AVP.
|
void |
removeExtensionAvps()
Removes all extension AVPs from the Remaining-Balance AVP.
|
void |
removeUnitValue()
Removes the Unit-Value AVP from the Remaining-Balance AVP.
|
void |
setCurrencyCode(long currencyCode)
Sets the value of the Currency-Code AVP, of type Unsigned32.
|
void |
setExtensionAvps(DiameterAvp[] avps)
Sets the set of extension AVPs with all the values in the given array.
|
void |
setUnitValue(UnitValue unitValue)
Sets the value of the Unit-Value AVP, of type Grouped.
|
byteArrayValue, clone, doubleValue, floatValue, getCode, getMandatoryRule, getName, getProtectedRule, getType, getVendorID, groupedAvpValue, intValue, longValue, stringValue
boolean hasUnitValue()
UnitValue getUnitValue()
void setUnitValue(UnitValue unitValue)
java.lang.NullPointerException
- if unitValue
is null
.void removeUnitValue()
boolean hasCurrencyCode()
long getCurrencyCode()
hasCurrencyCode()
to check the existence of this AVP.java.lang.IllegalStateException
- if the Currency-Code AVP has not been set.void setCurrencyCode(long currencyCode)
void removeCurrencyCode()
DiameterAvp[] getExtensionAvps()
void setExtensionAvps(DiameterAvp[] avps) throws AvpNotAllowedException
AvpNotAllowedException
- if an AVP is encountered of a type already known to this class
(i.e. an AVP for which get/set methods already appear in this class)java.lang.NullPointerException
- if avps
is null
.void removeExtensionAvps()