Class EPPBalanceInfoResp

java.lang.Object
com.verisign.epp.codec.gen.EPPResponse
com.verisign.epp.codec.balance.v02.EPPBalanceInfoResp
All Implemented Interfaces:
EPPCodecComponent, EPPMessage, Serializable, Cloneable

public class EPPBalanceInfoResp extends EPPResponse
A concrete EPPResponse that knows how to encode/decode Balance Info response from/to XML and object instance.
See Also:
  • Field Details

    • ELM_LOCALNAME

      public static final String ELM_LOCALNAME
      XML local name for EPPFeeCreData.
      See Also:
    • ELM_NAME

      public static final String ELM_NAME
      The poll data XML tag name
      See Also:
    • CURRENCY_DEFAULT

      public static final String CURRENCY_DEFAULT
      Default currency is "USD". The specification doesn't include a default, but adding it to make it easier to transition from the proprietary Balance Mapping.
      See Also:
    • EXECUTION_LIMIT_DEFAULT

      public static final BigDecimal EXECUTION_LIMIT_DEFAULT
      Default execution limit is 0.0.
    • ELM_BALANCE

      public static final String ELM_BALANCE
      The balance XML tag name
      See Also:
    • ELM_CREDIT_LIMIT

      public static final String ELM_CREDIT_LIMIT
      The creditLimit XML tag name
      See Also:
    • ELM_CASH_BALANCE

      public static final String ELM_CASH_BALANCE
      The cashBalance XML tag name
      See Also:
    • ELM_EXECUTION_LIMIT

      public static final String ELM_EXECUTION_LIMIT
      The executionLimit XML tag name
      See Also:
    • ELM_NOTIFICATION_THRESHOLD

      public static final String ELM_NOTIFICATION_THRESHOLD
      The notificationThreshold XML tag name
      See Also:
  • Constructor Details

    • EPPBalanceInfoResp

      public EPPBalanceInfoResp()
      Default constructor
    • EPPBalanceInfoResp

      public EPPBalanceInfoResp(EPPTransId aTransId, String aCurrency, BigDecimal aBalance, BigDecimal aCreditLimit, BigDecimal aCashBalance)
      EPPBalanceInfoResp that takes all of the required attributes.
      Parameters:
      aTransId - Transaction identifier information (server and optional client)
      aBalance - Balance to set
      aCreditLimit - Credit limit to set
      aCashBalance - Cash balance to set
    • EPPBalanceInfoResp

      public EPPBalanceInfoResp(EPPTransId aTransId, String aCurrency, BigDecimal aBalance, BigDecimal aCreditLimit, BigDecimal aCashBalance, BigDecimal aExecutionLimit, BigDecimal aNotificationThreshold)
      EPPBalanceInfoResp that takes all of the attributes.
      Parameters:
      aTransId - Transaction identifier information (server and optional client)
      aBalance - Balance to set
      aCreditLimit - Credit limit to set
      aCashBalance - Cash balance to set
      aExecutionLimit - Execution limit to set
      aNotificationThreshold - Notification limit to set
  • Method Details

    • getNamespace

      public String getNamespace()
      Returns the XML namespace associated with the EPPResponse.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Specified by:
      getNamespace in interface EPPMessage
      Overrides:
      getNamespace in class EPPResponse
      Returns:
      XML namespace for the EPPResponse.
    • doEncode

      public Element doEncode(Document aDocument) throws EPPEncodeException
      Put all data contained in this poll response into the given XML document
      Overrides:
      doEncode in class EPPResponse
      Parameters:
      aDocument - the DOM Document to attach data to.
      Returns:
      the element that is a parent of the poll data
      Throws:
      EPPEncodeException - Thrown if any errors occur during the encode process
    • doDecode

      public void doDecode(Element aElement) throws EPPDecodeException
      Populates the data of this instance from the given XML Element which is part of a DOM Document
      Overrides:
      doDecode in class EPPResponse
      Parameters:
      aElement - the element that is a parent of the poll data
      Throws:
      EPPDecodeException - thrown if any errors occur during the decode operation
    • equals

      public boolean equals(Object aObject)
      implements a deep EPPBalanceInfoResp compare.
      Overrides:
      equals in class EPPResponse
      Parameters:
      aObject - EPPBalanceInfoResp instance to compare with
      Returns:
      true if equal false otherwise
    • clone

      public Object clone() throws CloneNotSupportedException
      Clone EPPLowBalancePollResponse.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class EPPResponse
      Returns:
      clone of EPPLowBalancePollResponse
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • hasCurrency

      public boolean hasCurrency()
      Is the currency defined?
      Returns:
      true if the currency is defined; false otherwise.
    • getCurrency

      public String getCurrency()
      Gets the currency value.
      Returns:
      Currency if defined; null otherwise.
    • setCurrency

      public void setCurrency(String aCurrency)
      Sets the currency value.
      Parameters:
      aCurrency - Currency value
    • getBalance

      public BigDecimal getBalance()
      Gets the balance that represents the calculated Balance using the equation Balance (B) = Credit Limit (CL) + Cash Balance (CB).
      Returns:
      balance if set; null otherwise.
    • setBalance

      public void setBalance(BigDecimal aBalance)
      Sets the balance that represents the calculated Balance using the equation Balance (B) = Credit Limit (CL) + Cash Balance (CB).
      Parameters:
      aBalance - Balance to set
    • getCreditLimit

      public BigDecimal getCreditLimit()
      Gets the credit Limit that represents the calculated level of credit based on the set of active credit instruments.
      Returns:
      credit limit if set; null otherwise.
    • setCreditLimit

      public void setCreditLimit(BigDecimal aCreditLimit)
      Sets the credit Limit that represents the calculated level of credit based on the set of active credit instruments.
      Parameters:
      aCreditLimit - Credit limit to set
    • getCashBalance

      public BigDecimal getCashBalance()
      Gets the cash balance that represents the cash on hand that is impacted by client payments and billable transaction debits and credits, inclusive of the fees and taxes.
      Returns:
      cash balance if set; null otherwise.
    • setCashBalance

      public void setCashBalance(BigDecimal aCashBalance)
      Sets the cash balance that represents the cash on hand that is impacted by client payments and billable transaction debits and credits, inclusive of the fees and taxes.
      Parameters:
      aCashBalance - Cash balance to set
    • hasExecutionLimit

      public boolean hasExecutionLimit()
      Is the execution limit defined?
      Returns:
      true if the execution limit is defined; false otherwise.
    • getExecutionLimit

      public BigDecimal getExecutionLimit()
      Gets the execution limit
      Returns:
      Execution limit if set; null otherwise.
    • setExecutionLimit

      public void setExecutionLimit(BigDecimal aExecutionLimit)
      Sets the execution limit
      Parameters:
      aExecutionLimit - Credit threshold to set
    • hasNotificationThreshold

      public boolean hasNotificationThreshold()
      Is the notification threshold defined?
      Returns:
      true if the notification threshold is defined; false otherwise.
    • getNotificationThreshold

      public BigDecimal getNotificationThreshold()
      Gets the notification threshold
      Returns:
      Notification threshold if set; null otherwise.
    • setNotficationThreshold

      public void setNotficationThreshold(BigDecimal aNotificationThreshold)
      Sets the notification threshold
      Parameters:
      aNotificationThreshold - Credit threshold to set