com.google.checkout.merchantcalculation
Class MerchantCodeResult

java.lang.Object
  extended by com.google.checkout.merchantcalculation.MerchantCodeResult
Direct Known Subclasses:
CouponResult, GiftCertificateResult

public abstract class MerchantCodeResult
extends java.lang.Object

This class encapsulates the <merchant-code-results> tag used as part of the Merchant Calculation API.

Author:
simonjsmith

Constructor Summary
MerchantCodeResult()
           
 
Method Summary
 float getCalculatedAmount()
          Retrieves the value of the <calculated-amount> tag.
 java.lang.String getCode()
          Retrieves the value of the <code> tag.
 java.lang.String getCurrency()
          Retrieves the value of the currency attribute of the <calculated-amount> tag.
 java.lang.String getMessage()
          Retrieves the value of the <message> tag.
 java.lang.String getType()
          Retrieves the type of the result.
 boolean isValid()
          Retrieves the value of the <valid> tag.
 void setCalculatedAmount(float calculatedAmount)
          Sets the value of the <calculated-amount> tag.
 void setCode(java.lang.String code)
          Sets the value of the <code> tag.
 void setCurrency(java.lang.String currency)
          Sets the value of the currency attribute of the <calculated-amount> tag.
 void setMessage(java.lang.String message)
          Sets the value of the <message> tag.
 void setType(java.lang.String type)
          Sets the type of the result.
 void setValid(boolean valid)
          Sets the value of the <valid> tag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MerchantCodeResult

public MerchantCodeResult()
Method Detail

getCalculatedAmount

public float getCalculatedAmount()
Retrieves the value of the <calculated-amount> tag.

Returns:
The value of the discount.

setCalculatedAmount

public void setCalculatedAmount(float calculatedAmount)
Sets the value of the <calculated-amount> tag.

Parameters:
calculatedAmount - The value of the discount.

getCode

public java.lang.String getCode()
Retrieves the value of the <code> tag.

Returns:
The code.

setCode

public void setCode(java.lang.String code)
Sets the value of the <code> tag.

Parameters:
code - The code.

getCurrency

public java.lang.String getCurrency()
Retrieves the value of the currency attribute of the <calculated-amount> tag.

Returns:
The currency code.

setCurrency

public void setCurrency(java.lang.String currency)
Sets the value of the currency attribute of the <calculated-amount> tag.

Parameters:
currency - The currency code.

getMessage

public java.lang.String getMessage()
Retrieves the value of the <message> tag.

Returns:
The message to be shown to the user.

setMessage

public void setMessage(java.lang.String message)
Sets the value of the <message> tag.

Parameters:
message - The message to be shown to the user.

getType

public java.lang.String getType()
Retrieves the type of the result.

Returns:
The type of the result.

setType

public void setType(java.lang.String type)
Sets the type of the result.

Parameters:
type -

isValid

public boolean isValid()
Retrieves the value of the <valid> tag.

Returns:
The valid flag.

setValid

public void setValid(boolean valid)
Sets the value of the <valid> tag.

Parameters:
valid - The valid flag.