com.google.checkout
Class AbstractCheckoutRequest
java.lang.Object
com.google.checkout.AbstractCheckoutRequest
- Direct Known Subclasses:
- AbstractOrderProcessingRequest, CheckoutShoppingCartRequest
public abstract class AbstractCheckoutRequest
- extends java.lang.Object
The parent for all Checkout requests.
- Author:
- simonjsmith@google.com
Method Summary |
protected org.w3c.dom.Document |
getDocument()
|
java.lang.String |
getPostUrl()
|
protected org.w3c.dom.Element |
getRoot()
|
java.lang.String |
getXml()
Return the XML request String. |
java.lang.String |
getXmlPretty()
Return the nicely formatted XML request String. |
CheckoutResponse |
send()
Submit the request to the POST URL and return a CheckoutResponse. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
merchantInfo
protected MerchantInfo merchantInfo
AbstractCheckoutRequest
public AbstractCheckoutRequest(MerchantInfo merchantInfo,
java.lang.String requestType)
- Parameters:
merchantInfo
- The merchant's informationrequestType
- The request type
- Throws:
java.lang.IllegalArgumentException
- if the MerchantInfo is null.
AbstractCheckoutRequest
public AbstractCheckoutRequest(MerchantInfo merchantInfo,
org.w3c.dom.Document document)
- Parameters:
merchantInfo
- The merchant's infodocument
- A document that has already been constructed
getDocument
protected org.w3c.dom.Document getDocument()
- Returns:
- The document for this CheckoutRequest
getRoot
protected org.w3c.dom.Element getRoot()
- Returns:
- The root of the document for this CheckoutRequest
getPostUrl
public java.lang.String getPostUrl()
getXml
public java.lang.String getXml()
- Return the XML request String.
- Returns:
- The XML request String.
getXmlPretty
public java.lang.String getXmlPretty()
- Return the nicely formatted XML request String.
- Returns:
- The nicely formatted XML request String.
send
public CheckoutResponse send()
throws CheckoutException
- Submit the request to the POST URL and return a CheckoutResponse.
- Returns:
- The CheckoutResponse object.
- Throws:
CheckoutException
- if the post URL
for the merchant info was invalid.- See Also:
CheckoutResponse