com.google.checkout.notification
Class ChargeAmountNotification

java.lang.Object
  extended by com.google.checkout.notification.CheckoutNotification
      extended by com.google.checkout.notification.ChargeAmountNotification
All Implemented Interfaces:
java.io.Serializable

public class ChargeAmountNotification
extends CheckoutNotification

This class encapsulates the <charge-amount-notification> notification.

Author:
simonjsmith
See Also:
Serialized Form

Constructor Summary
ChargeAmountNotification(org.w3c.dom.Document document)
          A constructor which takes in an xml document representation of the request.
ChargeAmountNotification(java.io.InputStream inputStream)
          A constructor which takes the request as an InputStream.
ChargeAmountNotification(java.lang.String requestString)
          A constructor which takes the request as a String.
 
Method Summary
 java.lang.String getCurrencyCode()
          Retrieves the currency code.
 float getLatestChargeAmount()
          Retrieves the value of the <latest-charge-amount> tag.
 float getLatestPromotionChargeAmount()
          Retrieves the value of the <latest-promotion-charge-amount> tag
 float getTotalChargeAmount()
          Retrieves the value of the <total-charge-amount> tag.
 
Methods inherited from class com.google.checkout.notification.CheckoutNotification
getDocument, getGoogleOrderNo, getGoogleOrderNumber, getRoot, getRootNodeName, getSerialNumber, getTimestamp, getType, getXml, getXmlPretty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChargeAmountNotification

public ChargeAmountNotification(java.lang.String requestString)
                         throws CheckoutException
A constructor which takes the request as a String.

Parameters:
requestString -
Throws:
CheckoutException - if there was an error prcessing the request string

ChargeAmountNotification

public ChargeAmountNotification(java.io.InputStream inputStream)
                         throws CheckoutException
A constructor which takes the request as an InputStream.

Parameters:
inputStream -
Throws:
CheckoutException - if there was an error prcessing the request from the InputStream

ChargeAmountNotification

public ChargeAmountNotification(org.w3c.dom.Document document)
A constructor which takes in an xml document representation of the request.

Parameters:
document -
Method Detail

getLatestChargeAmount

public float getLatestChargeAmount()
Retrieves the value of the <latest-charge-amount> tag.

Returns:
The latest charge amount.

getLatestPromotionChargeAmount

public float getLatestPromotionChargeAmount()
Retrieves the value of the <latest-promotion-charge-amount> tag

Returns:
The latest promotion charge amount

getTotalChargeAmount

public float getTotalChargeAmount()
Retrieves the value of the <total-charge-amount> tag.

Returns:
The total charge amount.

getCurrencyCode

public java.lang.String getCurrencyCode()
Retrieves the currency code.

Returns:
The currency code.