|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.checkout.AbstractCheckoutRequest
com.google.checkout.orderprocessing.AbstractOrderProcessingRequest
com.google.checkout.orderprocessing.RefundOrderRequest
public class RefundOrderRequest
This class contains methods that construct <refund-order> API requests.
Field Summary | |
---|---|
static java.lang.String |
REFUND_ERROR_STRING
|
static int |
REFUND_STRING_LIMIT
|
Fields inherited from class com.google.checkout.AbstractCheckoutRequest |
---|
merchantInfo |
Constructor Summary | |
---|---|
RefundOrderRequest(MerchantInfo merchantInfo)
Constructor which takes an instance of MerchantInfo. |
|
RefundOrderRequest(MerchantInfo merchantInfo,
java.lang.String googleOrderNumber,
java.lang.String reason)
Constructor which takes an instance of MerchantInfo, the Google order number and the reason for the refund. |
|
RefundOrderRequest(MerchantInfo merchantInfo,
java.lang.String googleOrderNumber,
java.lang.String reason,
float amount,
java.lang.String comment)
Constructor which takes an instance of MerchantInfo, the Google order number, the reason for the refund, the refund amount and any additional comment. |
Method Summary | |
---|---|
float |
getAmount()
Return the refund amount, which is value of the <amount> tag. |
java.lang.String |
getComment()
Return the refund comment String, which is the value of the <comment> tag. |
java.lang.String |
getReason()
Return the refund reason String, which is the value of the <reason> tag. |
boolean |
isWithinRefundStringLimits(java.lang.String reason,
java.lang.String comment)
Determine whether the reason and comment are within the string length limits. |
void |
setAmount(float amount)
Set the refund amount, which is value of the <amount> tag. |
void |
setComment(java.lang.String comment)
Set the refund order comment String, which is the value of the <comment> tag. |
void |
setReason(java.lang.String reason)
Set the refund reason String, which is the value of the <reason> tag. |
Methods inherited from class com.google.checkout.orderprocessing.AbstractOrderProcessingRequest |
---|
getGoogleOrderNo, getGoogleOrderNumber, setGoogleOrderNo, setGoogleOrderNumber |
Methods inherited from class com.google.checkout.AbstractCheckoutRequest |
---|
getDocument, getPostUrl, getRoot, getXml, getXmlPretty, send |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int REFUND_STRING_LIMIT
public static final java.lang.String REFUND_ERROR_STRING
Constructor Detail |
---|
public RefundOrderRequest(MerchantInfo merchantInfo)
merchantInfo
- The merchant's information.public RefundOrderRequest(MerchantInfo merchantInfo, java.lang.String googleOrderNumber, java.lang.String reason)
merchantInfo
- The merchant's information.googleOrderNumber
- The Google order number.reason
- The reason for the refund.public RefundOrderRequest(MerchantInfo merchantInfo, java.lang.String googleOrderNumber, java.lang.String reason, float amount, java.lang.String comment) throws CheckoutException
merchantInfo
- The merchant's information.googleOrderNumber
- The Google order number.reason
- The reason for the refund.amount
- The amount to refund the buyer.comment
- Any additional comment needed.
CheckoutException
- if merchantInfo, reason or comment is null.Method Detail |
---|
public boolean isWithinRefundStringLimits(java.lang.String reason, java.lang.String comment)
reason
- The reason for the refund.comment
- Any additional comment needed.
CheckoutException
- if reason or comment is null.public float getAmount()
public java.lang.String getComment()
public java.lang.String getReason()
public void setAmount(float amount) throws CheckoutException
amount
- The refund amount.
CheckoutException
- if amount <= 0.public void setComment(java.lang.String comment) throws CheckoutException
comment
- The refund comment String.
CheckoutException
- if comment is null.public void setReason(java.lang.String reason)
reason
- The refund reason String.
CheckoutException
- if reason is null.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |