Class EPPFeeCredit

java.lang.Object
com.verisign.epp.codec.fee.v1_0.EPPFeeCredit
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPFeeCredit extends Object implements EPPCodecComponent
EPPFeeCredit represents the credit value information returned by the server.
See Also:
  • Field Details

  • Constructor Details

    • EPPFeeCredit

      public EPPFeeCredit()
      Default constructor. The command value MUST be set using the setCredit(BigDecimal) method.
    • EPPFeeCredit

      public EPPFeeCredit(BigDecimal aCredit)
      Create EPPFeeCredit instance with the required credit value.
      Parameters:
      aCredit - The credit value
    • EPPFeeCredit

      public EPPFeeCredit(BigDecimal aCredit, String aDescription)
      Create EPPFeeCredit instance with the required credit value and the optional description.
      Parameters:
      aCredit - The credit value
      aDescription - Human-readable description
    • EPPFeeCredit

      public EPPFeeCredit(BigDecimal aCredit, String aDescription, String aLanguage)
      Create EPPFeeCredit instance with all attributes
      Parameters:
      aCredit - The credit value
      aDescription - Human-readable description
      aLanguage - Optional language of aDescription. Set to null to set the default language, which is "en".
  • Method Details

    • hasDescription

      public boolean hasDescription()
      Is the description defined?
      Returns:
      true if the description is defined; false otherwise.
    • getDescription

      public String getDescription()
      Gets the description value.
      Returns:
      Description if defined; null otherwise.
    • setDescription

      public void setDescription(String aDescription)
      Sets the description value.
      Parameters:
      aDescription - Description value.
    • getLanguage

      public String getLanguage()
      Gets description language.
      Returns:
      Description language with the default of DEFAULT_LANG.
    • setLanguage

      public void setLanguage(String aLanguage)
      Sets description language.
      Parameters:
      aLanguage - Sets description language. Set to null to set to the default value.
    • getCredit

      public BigDecimal getCredit()
      Gets the credit value.
      Returns:
      Credit value
    • setCredit

      public void setCredit(BigDecimal aCredit)
      Sets the credit value.
      Parameters:
      aCredit - Credit value
    • clone

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

      public void decode(Element aElement) throws EPPDecodeException
      Decode the EPPFeeCredit element aElement DOM Element tree.
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - - Root DOM Element to decode EPPFeeCredit from.
      Throws:
      EPPDecodeException - Unable to decode aElement
    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      Encode a DOM Element tree from the attributes of the EPPFeeCredit instance.
      Specified by:
      encode in interface EPPCodecComponent
      Parameters:
      aDocument - - DOM Document that is being built. Used as an Element factory.
      Returns:
      Element - Root DOM Element representing the EPPFeeCredit instance.
      Throws:
      EPPEncodeException - - Unable to encode EPPFeeCredit instance.
    • equals

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

      public String toString()
      Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
      Overrides:
      toString in class Object
      Returns:
      Indented XML String if successful; ERROR otherwise.
    • getNamespace

      public String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Returns:
      XML namespace for the EPPCodecComponent.