|
|||||||||
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.lineitem.CancelItemsRequest
public class CancelItemsRequest
This class contains methods that construct <cancel-items> API requests.
Field Summary | |
---|---|
static java.lang.String |
CANCEL_ERROR_STRING
|
static int |
CANCEL_STRING_LIMIT
|
Fields inherited from class com.google.checkout.AbstractCheckoutRequest |
---|
merchantInfo |
Constructor Summary | |
---|---|
CancelItemsRequest(MerchantInfo merchantInfo)
Constructor which takes an instance of MerchantInfo. |
|
CancelItemsRequest(MerchantInfo merchantInfo,
java.lang.String googleOrderNumber)
Constructor which takes an instance of MerchantInfo and the Google order number. |
|
CancelItemsRequest(MerchantInfo merchantInfo,
java.lang.String googleOrderNumber,
java.lang.String reason)
Constructor which takes an instance of MerchantInfo, Google order number and the reason for the cancellation. |
|
CancelItemsRequest(MerchantInfo merchantInfo,
java.lang.String googleOrderNo,
java.lang.String reason,
java.lang.String comment)
Constructor which takes an instance of merchantInfo, Google order number, reason for cancellation and comment. |
Method Summary | |
---|---|
void |
addItem(java.lang.String merchantItemId)
Add the merchantItemId which is to be canceled. |
java.lang.String |
getComment()
Return the cancel order comment String, which is the value of the <comment> tag. |
java.lang.String |
getReason()
Return the cancel order reason String, which is the value of the <reason> tag. |
boolean |
isSendEmail()
True if an email is to be sent to the buyer. |
boolean |
isWithinCancelStringLimits(java.lang.String reason,
java.lang.String comment)
Determine whether the reason and comment are within the string length limits. |
void |
setComment(java.lang.String comment)
Set the cancel order comment String, which is the value of the <comment> tag. |
void |
setReason(java.lang.String reason)
Set the cancel order reason String, which is the value of the <reason> tag. |
void |
setSendEmail(boolean sendEmail)
True if an email is to be sent to the buyer. |
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 CANCEL_STRING_LIMIT
public static final java.lang.String CANCEL_ERROR_STRING
Constructor Detail |
---|
public CancelItemsRequest(MerchantInfo merchantInfo)
merchantInfo
- The merchant's information.public CancelItemsRequest(MerchantInfo merchantInfo, java.lang.String googleOrderNumber)
merchantInfo
- The merchant's informationgoogleOrderNumber
- The Google order number.public CancelItemsRequest(MerchantInfo merchantInfo, java.lang.String googleOrderNumber, java.lang.String reason)
merchantInfo
- The merchant's informationgoogleOrderNumber
- The Google order number.reason
- The reason for the cancellation.public CancelItemsRequest(MerchantInfo merchantInfo, java.lang.String googleOrderNo, java.lang.String reason, java.lang.String comment)
merchantInfo
- The merchant's informationgoogleOrderNo
- The Google order number.reason
- The reason for cancellation.comment
- An additional comment.
CheckoutException
- if merchantInfo is null.Method Detail |
---|
public boolean isSendEmail()
public void setSendEmail(boolean sendEmail)
sendEmail
- The boolean value.public void addItem(java.lang.String merchantItemId)
merchantItemId
- public java.lang.String getComment()
public java.lang.String getReason()
public void setComment(java.lang.String comment)
comment
- A comment associated with the cancellation.public void setReason(java.lang.String reason)
reason
- The reason for cancellation.public boolean isWithinCancelStringLimits(java.lang.String reason, java.lang.String comment)
reason
- The reason for cancellation.comment
- An additional comment.
CheckoutException
- if reason is null or if comment if null.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |