com.google.checkout.merchantcalculation
Class CouponResult

java.lang.Object
  extended by com.google.checkout.merchantcalculation.MerchantCodeResult
      extended by com.google.checkout.merchantcalculation.CouponResult

public class CouponResult
extends MerchantCodeResult

This class encapsulates the <coupon-result> tag used as part of the Merchant Calculation API.

Author:
simonjsmith
See Also:
MerchantCodeResult

Constructor Summary
CouponResult(boolean valid, float calculatedAmount, java.lang.String currency, java.lang.String code, java.lang.String message)
          A constructor which takes all the relevant parameters.
 
Method Summary
 
Methods inherited from class com.google.checkout.merchantcalculation.MerchantCodeResult
getCalculatedAmount, getCode, getCurrency, getMessage, getType, isValid, setCalculatedAmount, setCode, setCurrency, setMessage, setType, setValid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CouponResult

public CouponResult(boolean valid,
                    float calculatedAmount,
                    java.lang.String currency,
                    java.lang.String code,
                    java.lang.String message)
A constructor which takes all the relevant parameters.

Parameters:
valid - Whether the code is valid.
calculatedAmount - The discount amount.
currency - The currency.
code - The coupon code.
message - The message to display to the user.