public class DomainCheckPriceResponseExtension extends ResponseExtension
Representation of the EPP Domain Check response extension for Pricing Check aspect of the Domain Name Check Pricing extension.
Use this to access "period", "create" and "renew" fees, and "reason" pricing information for domains as provided in an extension to the EPP Domain Check response. Such a service element is sent by a compliant EPP server in response to a valid Domain Check command with the Pricing Check extension.
For flexibility, this implementation extracts the data from the response using XPath queries, the expressions for which are defined statically.
CHK_DATA, CREATE, DATA, EXTENSION_EXPR, INFO, RENEW, TRANSFER, UPDATE
Constructor and Description |
---|
DomainCheckPriceResponseExtension() |
Modifier and Type | Method and Description |
---|---|
void |
fromXML(XMLDocument xmlDoc)
Initialises the instance from the given XML document.
|
java.math.BigDecimal |
getCreatePrice(java.lang.Long index) |
java.math.BigDecimal |
getCreatePrice(java.lang.String domainName) |
Period |
getPeriod(long index) |
Period |
getPeriod(java.lang.String domainName) |
java.lang.String |
getReason(long index) |
java.lang.String |
getReason(java.lang.String domainName) |
java.math.BigDecimal |
getRenewPrice(java.lang.Long index) |
java.math.BigDecimal |
getRenewPrice(java.lang.String domainName) |
boolean |
isInitialised()
Indicates whether fromXML() completed successfully and the extension was
successfully initialised from the EPP response.
|
java.lang.Boolean |
isPremium(long index) |
java.lang.Boolean |
isPremium(java.lang.String domainName) |
replaceResponseType
public final void fromXML(XMLDocument xmlDoc) throws javax.xml.xpath.XPathExpressionException
ResponseExtension
fromXML
in class ResponseExtension
xmlDoc
- the XML to be processedjavax.xml.xpath.XPathExpressionException
public boolean isInitialised()
ResponseExtension
isInitialised
in class ResponseExtension
public final java.lang.Boolean isPremium(java.lang.String domainName)
domainName
- domain name to be checkedpublic final Period getPeriod(java.lang.String domainName)
domainName
- domain name to be checkedpublic final java.math.BigDecimal getCreatePrice(java.lang.String domainName)
domainName
- domain name to be checkedpublic final java.math.BigDecimal getRenewPrice(java.lang.String domainName)
domainName
- domain name to be checkedpublic final java.lang.String getReason(java.lang.String domainName)
domainName
- domain name to be checkedpublic final java.lang.Boolean isPremium(long index)
index
- the index of domain to be checkedpublic final Period getPeriod(long index)
index
- the index of domain to be checkedpublic final java.math.BigDecimal getCreatePrice(java.lang.Long index)
index
- the index of domain to be checkedpublic final java.math.BigDecimal getRenewPrice(java.lang.Long index)
index
- the index of domain to be checkedpublic final java.lang.String getReason(long index)
index
- the index of domain to be checked