com.google.checkout.merchantcalculation
Class GiftCertificateResult

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

public class GiftCertificateResult
extends MerchantCodeResult

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

Author:
simonjsmith
See Also:
MerchantCodeResult

Constructor Summary
GiftCertificateResult(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

GiftCertificateResult

public GiftCertificateResult(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 gift certificate code.
message - The message to display to the user.