public class ReturnRequest
extends java.lang.Object
implements java.io.Serializable
The loadReturnRequest(RepositoryItem)
is used to load return request properties from repository item.
if you add additional properties to return request and it needs to be loaded to the return request object, you need
to extend this method.
The saveReturnRequest(MutableRepositoryItem)
is used to save return request properties to repository item.
if you add additional properties to return request and it needs to be saved in the repository, you need
to extend this method.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
protected java.util.Map |
mDiscountableMap |
protected java.util.Map |
mExchangeManualAdjustmentValue |
protected java.util.Map |
mExchangeOrderPromotionValue |
protected java.util.Map |
mExchangeToPEOItemMap |
protected java.util.Map |
mExchangeToPEOShippingGroupMap |
protected java.util.Map<atg.commerce.promotion.GWPMultiHashKey,GiftWithPurchaseSelection> |
mGWPSelections |
protected java.util.List |
mItemPriceSources |
protected java.util.Collection |
mItemPromotions |
protected java.util.Collection |
mNonReturnItemCostAdjustments |
protected double |
mNonReturnItemSubtotalAdjustment |
protected java.util.Collection |
mOrderPromotions |
protected Order |
mOriginatingOrder |
protected java.util.Map |
mOriginatingToRAOItemMap |
protected java.util.Map |
mOriginatingToRAOShippingGroupMap |
protected java.util.Map |
mPEOToExchangeItemMap |
protected java.util.Map |
mPEOToExchangeShippingGroupMap |
protected java.util.Map |
mPEOToRCOItemMap |
protected java.util.Map |
mPEOToRCOShippingGroupMap |
protected java.util.Map |
mPreReturnPromotionValue |
protected RepositoryItem |
mPriceList |
protected Order |
mPromotionEvaluationOrder |
protected java.util.Map |
mPromotionValueAdjustment |
protected java.util.Map |
mRAOToOriginatingItemMap |
protected java.util.Map |
mRAOToOriginatingShippingGroupMap |
protected java.util.Map |
mRAOToRCOItemMap |
protected java.util.Map |
mRAOToRCOShippingGroupMap |
protected java.util.Map |
mRAOToReplacementItemMap |
protected java.util.Map |
mRAOToReplacementShippingGroupMap |
protected java.util.Map |
mRCOToPEOItemMap |
protected java.util.Map |
mRCOToPEOShippingGroupMap |
protected java.util.Map |
mRCOToRAOItemMap |
protected java.util.Map |
mRCOToRAOShippingGroupMap |
protected java.util.List |
mRelatedReplacementOrders |
protected java.util.Map |
mReplacementToRAOItemMap |
protected java.util.Map |
mReplacementToRAOShippingGroupMap |
protected Order |
mReturnAdjustedOrder |
protected Order |
mReturnCalculationOrder |
protected RepositoryItem |
mSalePriceList |
protected java.util.Map |
mShippingCostMap |
protected java.lang.Object[] |
mSortedRelatedReturnRequests |
Constructor and Description |
---|
ReturnRequest()
Initializes a ReturnRequest object with a null order
|
ReturnRequest(Order pOrder)
Initializes a ReturnRequest object based on the given order.
|
Modifier and Type | Method and Description |
---|---|
void |
addNonReturnItemCostAdjustment(ItemCostAdjustment pItemCostAdjustment)
Adds a new
ItemCostAdjustment to the return. |
void |
addNonReturnItemCostAdjustments(java.util.Collection pNonReturnItemCostAdjustments)
Adds a collection of
ItemCostAdjustment objects to the return. |
void |
clearNonReturnItemCostAdjustments()
Clears all the
ItemCostAdjustment objects from the return |
double |
getActualShippingRefund()
Returns the actual shipping cost refund amount
|
double |
getActualTaxRefund()
Returns the actual tax refund amount
|
double |
getAdjustmentAmount()
returns the total amount of adjustments.
|
java.lang.String |
getAgentId()
Gets property agentId
|
double |
getAllocatedAmount()
Returns the total refund amount that has been allocated to refund methods.
|
java.util.Date |
getAuthorizationDate()
Returns authorization date
|
java.lang.String |
getAuthorizationNumber()
Returns authorization number
|
java.lang.String |
getComments()
returns the comments about this return
|
atg.commerce.csr.returns.ProcessName |
getCurrentProcessName()
This method gets the current process name.
If the process name is null, then based on the replacement order, this method sets to Return or Exchange. |
java.util.Map |
getDiscountableMap()
Returns the Map of discountable flags based on the state
saved on the originating order and all related replacement orders.
|
java.util.Map |
getExchangeManualAdjustmentValue()
Returns the map of manual adjustment to their adjustment value.
|
java.util.Map |
getExchangeOrderPromotionValue()
Returns the map of order promotion to their adjustment value.
|
java.util.Map |
getExchangeToPEOItemMap()
This maps items in the new exchange order to their matching counterpart
in the promotion evaluation order.
|
java.util.Map |
getExchangeToPEOShippingGroupMap()
This maps shipping groups in the new exchange order to their matching counterpart
in the promotion evaluation order.
|
StoreCredit |
getGeneratedStoreCredit()
Returns the generatedStoreCredit.
|
RepositoryItem |
getGeneratedStoreCreditItem()
Returns the transient repository item matching the generatedStoreCredit.
|
java.util.Map<atg.commerce.promotion.GWPMultiHashKey,GiftWithPurchaseSelection> |
getGWPSelections()
These
GiftWithPurchaseSelection objects are generated based on
the gwp items that are being exchanged. |
static ReturnRequest |
getInstance()
Deprecated.
|
static ReturnRequest |
getInstance(Order pOrder)
Deprecated.
|
java.util.List |
getItemPriceSources()
Returns the list of
ItemPriceSource objects that are used
to price the working orders and the exchange order in the return. |
java.util.Collection |
getItemPromotions() |
java.util.Collection |
getNonReturnItemCostAdjustments()
Returns the collection of
ItemCostAdjustment objects
that were generated for items not being returned and
included when calculating the suggested refund amounts for the
return. |
double |
getNonReturnItemSubtotalAdjustment()
This is the adjustment to the
totalItemRefund
based on the adjustments to non-return item's
amount, order discount share and manual adjustment share |
Order |
getOrder()
returns the the order that this return is related to
|
java.util.Collection |
getOrderPromotions() |
Order |
getOriginatingOrder()
Returns the originating order for this
return request.
|
java.util.Map |
getOriginatingToRAOItemMap()
Maps the commerce item ids in the originating order to their matching
counterparts in the Return Adjusted Order.
|
java.util.Map |
getOriginatingToRAOShippingGroupMap()
Maps the shipping group ids in the originating order to their matching
counterparts in the Return Adjusted Order.
|
java.lang.String |
getOriginOfReturn()
Returns property originOfReturn
|
double |
getOtherRefund() |
java.util.Map |
getPEOToExchangeItemMap()
This maps items in the promotion evaluation order to their matching
counterpart in the new exchange order.
|
java.util.Map |
getPEOToExchangeShippingGroupMap()
This maps shipping groups in the promotion evaluation order to their matching
counterpart in the new exchange order.
|
java.util.Map |
getPEOToRCOItemMap()
This maps items in the promotion evaluation order to their matching counter
part in the return calculation order.
|
java.util.Map |
getPEOToRCOShippingGroupMap()
This maps items in the promotion evaluation order to their matching counter
part in the return calculation order.
|
java.util.Map |
getPreReturnPromotionValue()
This map contains the adjustment value of each promotion
at the start of the return.
|
RepositoryItem |
getPriceList() |
atg.commerce.csr.returns.ProcessName |
getProcessName() |
RepositoryItem |
getProfile() |
Order |
getPromotionEvaluationOrder()
Returns a reference to the PromotionEvaluationOrder created for the exchange.
|
java.util.Map |
getPromotionValueAdjustments()
This map contains the change in promotion value as a
result of the current return or exchange.
|
java.util.Map |
getRAOToOriginatingItemMap()
Maps the commerce item ids in the Return Adjusted Order to their matching
counterparts in the originating order.
|
java.util.Map |
getRAOToOriginatingShippingGroupMap()
Maps the shipping group ids in the Return Adjusted Order to their matching
counterparts in the originating order.
|
java.util.Map |
getRAOToRCOItemMap()
This maps items in the return adjusted order to their matching counter
part in the return calculation order.
|
java.util.Map |
getRAOToRCOShippingGroupMap()
This maps shipping groups in the return adjusted order to their matching counter
part in the return calculation order.
|
java.util.Map |
getRAOToReplacementItemMap()
The maps RAO item ids to their original replacement item ids
|
java.util.Map |
getRAOToReplacementShippingGroupMap()
The maps RAO shipping group ids to their original replacement shipping group ids
|
java.util.Map |
getRCOToPEOItemMap()
This maps items in the return calcuation order to their matching counter
part in the promotion evaluation order.
|
java.util.Map |
getRCOToPEOShippingGroupMap()
This maps items in the return calculation order to their matching counter
part in the promotin evaluation order.
|
java.util.Map |
getRCOToRAOItemMap()
This maps items in the return calculation order to their matching counter
part in the return adjusted order.
|
java.util.Map |
getRCOToRAOShippingGroupMap()
This maps shipping groups in the return calcuation order to their matching counter
part in the return adjusted order.
|
java.util.ArrayList<RefundMethod> |
getRefundMethodList()
Returns list of refund methods that are available
|
double |
getRefundSubtotal()
Returns the subtotal amount of this refund.
|
java.util.List |
getRelatedReplacementOrders()
This list includes all the replacement orders
associated with the
sortedReturnRequests |
long |
getReplaceItemCount()
The number of items being replaced.
|
Order |
getReplacementOrder() |
java.util.Map |
getReplacementToRAOItemMap()
This maps items copied from each exchange order to their counterpart in the return adjusted order.
|
java.util.Map |
getReplacementToRAOShippingGroupMap()
This maps shipping groups in the exchange orders to their matching counter parts in the
return adjusted order.
|
java.lang.String |
getRequestId()
returns the ID of the request that this object represents
|
Order |
getReturnAdjustedOrder()
Returns a reference to the ReturnAdjustedOrder created for the return.
|
Order |
getReturnCalculationOrder()
Returns a reference to the ReturnCalculationOrder created for the return.
|
double |
getReturnFee()
Returns the fee associated with the return
|
long |
getReturnItemCount()
The number of items being returned
|
java.util.ArrayList |
getReturnItemList()
Returns list of items selected for inclusion in this return
|
java.util.HashMap |
getReturnItemMap()
Returns map of ReturnItem Ids to the ReturnItems
|
atg.commerce.csr.returns.ReturnPaymentState |
getReturnPaymentState()
Returns the returnPaymentState.
|
RepositoryItem |
getSalePriceList() |
java.util.Map |
getShippingCostMap()
Maps ShippingGroupCommerceItemRelationships to the their shipping cost in the original
purchase order
|
java.util.ArrayList |
getShippingGroupList()
Returns list of shipping groups associated with this return request
|
java.util.HashMap |
getShippingGroupMap()
Returns list of shipping groups associated with this return request
|
java.lang.Object[] |
getSortedRelatedReturnRequests()
Returns a reference to the sorted array of related return request objects
|
java.lang.String |
getState()
The state of this return request
|
java.lang.String |
getStateAsUserResource()
returns the ReturnRequest state as a user resource
|
java.lang.String |
getStateDetailAsUserResource()
returns the ReturnRequest state detail as a user resource
|
double |
getSuggestedShippingRefund()
returns the suggested shipping cost refund amount
|
double |
getSuggestedTaxRefund()
returns the suggested tax refund amount
|
double |
getTotalItemRefund()
This method returns the item subtotal for this refund, not including refund for taxes & shipping.
|
double |
getTotalRefundAmount()
returns the total amount of this refund, less the return fee
|
double |
getTotalReturnItemRefund()
Returns the total refund for the items being returned.
|
double |
getUnallocatedAmount()
Returns the total refund amount that is not allocated to a refund method.
|
boolean |
isExchangeProcess()
This is the utility method to find whether the current process is the
exchange process or not. |
boolean |
isProcessed()
returns boolean indicating if this request has been processed
|
boolean |
isProcessImmediately()
returns the 'process immediately' setting
|
boolean |
isReplacingItems()
Deprecated.
|
boolean |
isReturningItems()
Are we returning one or more items?
|
boolean |
isReturnProcess()
This is the utility method to find whether the current process is the
return process or not. |
void |
loadReturnRequest(RepositoryItem pSource)
This method is used to copy the information from the source return request repository item to
return request instance.
|
void |
saveReturnRequest(MutableRepositoryItem pDestination)
This method is used to copy the information from return request instance to
repository item.
|
void |
setActualShippingRefund(double pActualShippingRefund)
Sets the actual shipping cost refund amount
|
void |
setActualTaxRefund(double pActualTaxRefund)
Sets the actual tax refund amount
|
void |
setAgentId(java.lang.String pAgentId)
Sets agentId
|
void |
setAuthorizationDate(java.util.Date pAuthorizationDate)
Sets authorization date
|
void |
setAuthorizationNumber(java.lang.String pAuthorizationNumber)
Sets authorization number
|
void |
setComments(java.lang.String pComments)
sets the comments about this return
|
void |
setDiscountableMap(java.util.Map pDiscountableState) |
void |
setExchangeManualAdjustmentValue(java.util.Map pExchangeManualAdjustmentValue) |
void |
setExchangeOrderPromotionValue(java.util.Map pExchangeOrderPromotionValue) |
void |
setExchangeToPEOItemMap(java.util.Map pExchangeToPEOItemMap) |
void |
setExchangeToPEOShippingGroupMap(java.util.Map pExchangeToPEOShippingGroupMap) |
void |
setGeneratedStoreCredit(StoreCredit pGeneratedStoreCredit) |
void |
setGeneratedStoreCredit(StoreCredit pGeneratedStoreCredit,
RepositoryItem pItem)
Sets the generatedStoreCredit.
|
void |
setGWPSelections(java.util.Map<atg.commerce.promotion.GWPMultiHashKey,GiftWithPurchaseSelection> pGWPSelections) |
void |
setItemPriceSources(java.util.List pItemPriceSources)
Sets the list of
ItemPriceSource objects that are used
to price the working orders and the exchange order in the return. |
void |
setItemPromotions(java.util.Collection pItemPromotions)
Sets the Collection of item level promotions used to calculate pricing
of the Return Adjusted, Return Calculation and Promotion Evaluation Orders.
|
void |
setNonReturnItemSubtotalAdjustment(double pNonReturnItemSubtotalAdjustment) |
protected void |
setOrder(Order pOrder)
sets the the order that this return is related to
|
void |
setOrderPromotions(java.util.Collection pOrderPromotions)
Sets the Collection of order level promotions used to calculate pricing
of the Return Adjusted, Return Calculation and Promotion Evaluation Orders.
|
void |
setOriginatingOrder(Order pOriginatingOrder) |
void |
setOriginatingToRAOItemMap(java.util.Map pOriginatingToRAOItemMap) |
void |
setOriginatingToRAOShippingGroupMap(java.util.Map pOriginatingToRAOShippingGroupMap) |
void |
setOriginOfReturn(java.lang.String pOriginOfReturn)
Sets property originOfReturn
|
void |
setOtherRefund(double pOtherRefund) |
void |
setPEOToRCOItemMap(java.util.Map pPEOToRCOItemMap) |
void |
setPEOToRCOShippingGroupMap(java.util.Map pPEOToRCOShippingGroupMap) |
void |
setPreReturnPromotionValue(java.util.Map pPreReturnPromotionValue) |
void |
setPriceList(RepositoryItem pPriceList) |
void |
setProcessed(boolean pProcessed)
sets boolean indicating if this request has been processed
|
void |
setProcessImmediately(boolean pProcessImmediately)
sets the 'process immediately' setting
|
void |
setProcessName(atg.commerce.csr.returns.ProcessName pProcessName) |
void |
setProfile(RepositoryItem pProfile) |
void |
setPromotionEvaluationOrder(Order pPromotionEvaluationOrder) |
void |
setPromotionValueAdjustments(java.util.Map pPromotionValueAdjustment) |
void |
setRAOToOriginatingItemMap(java.util.Map pRAOToOriginatingItemMap) |
void |
setRAOToOriginatingShippingGroupMap(java.util.Map pRAOToOriginatingShippingGroupMap) |
void |
setRAOToRCOItemMap(java.util.Map pRAOToRCOItemMap) |
void |
setRAOToRCOShippingGroupMap(java.util.Map pRAOToRCOShippingGroupMap) |
void |
setRCOToPEOItemMap(java.util.Map pRCOToPEOItemMap) |
void |
setRCOToPEOShippingGroupMap(java.util.Map pRCOToPEOShippingGroupMap) |
void |
setRCOToRAOItemMap(java.util.Map pRCOToRAOItemMap) |
void |
setRCOToRAOShippingGroupMap(java.util.Map pRCOToRAOShippingGroupMap) |
void |
setRelatedReplacementOrders(java.util.List pRelatedReplacementOrders) |
protected void |
setReplacementOrder(Order pReplacementOrder)
sets the replacement order
|
void |
setReplacementToRAOItemMap(java.util.Map pReplacementToRAOItemMap) |
void |
setReplacementToRAOShippingGroupMap(java.util.Map pReplacementToRAOShippingGroupMap) |
protected void |
setRequestId(java.lang.String pRequestId)
sets the ID of the request that this object represents
|
void |
setReturnAdjustedOrder(Order pReturnAdjustedOrder) |
void |
setReturnCalculationOrder(Order pReturnCalculationOrder) |
void |
setReturnFee(double pReturnFee)
Sets the fee associated with a return
|
void |
setReturnPaymentState(atg.commerce.csr.returns.ReturnPaymentState pReturnPaymentState)
Sets the returnPaymentState.
|
void |
setSalePriceList(RepositoryItem pSalePriceList) |
void |
setShippingCostMap(java.util.Map pShippingCostMap) |
void |
setSortedRelatedReturnRequests(java.lang.Object[] pSortedRelatedReturnRequests) |
protected void |
setState(java.lang.String pState)
sets the state of this return request
|
protected void |
setSuggestedShippingRefund(double pSuggestedShippingRefund)
sets the suggested shipping cost refund amount
|
protected void |
setSuggestedTaxRefund(double pSuggestedTaxRefund)
sets the suggested tax refund amount
|
java.lang.String |
toString() |
public static final java.lang.String CLASS_VERSION
protected java.util.Map mDiscountableMap
protected RepositoryItem mPriceList
protected RepositoryItem mSalePriceList
protected double mNonReturnItemSubtotalAdjustment
protected java.lang.Object[] mSortedRelatedReturnRequests
protected Order mReturnAdjustedOrder
protected java.util.Map mOriginatingToRAOItemMap
protected java.util.Map mRAOToOriginatingItemMap
protected java.util.Map mOriginatingToRAOShippingGroupMap
protected java.util.Map mRAOToOriginatingShippingGroupMap
protected Order mReturnCalculationOrder
protected java.util.Map mRAOToRCOItemMap
protected java.util.Map mRCOToRAOItemMap
protected java.util.Map mRAOToRCOShippingGroupMap
protected java.util.Map mRCOToRAOShippingGroupMap
protected Order mPromotionEvaluationOrder
protected java.util.Map mRCOToPEOItemMap
protected java.util.Map mPEOToRCOItemMap
protected java.util.Map mPEOToRCOShippingGroupMap
protected java.util.Map mRCOToPEOShippingGroupMap
protected java.util.Map mExchangeToPEOItemMap
protected java.util.Map mPEOToExchangeItemMap
protected java.util.Map mReplacementToRAOItemMap
protected java.util.Map mReplacementToRAOShippingGroupMap
protected java.util.Map mRAOToReplacementItemMap
protected java.util.Map mRAOToReplacementShippingGroupMap
protected java.util.Map mExchangeToPEOShippingGroupMap
protected java.util.Map mPEOToExchangeShippingGroupMap
protected Order mOriginatingOrder
protected java.util.Collection mItemPromotions
protected java.util.Collection mOrderPromotions
protected java.util.Map mExchangeOrderPromotionValue
protected java.util.Map mExchangeManualAdjustmentValue
protected java.util.Map mShippingCostMap
protected java.util.Map mPreReturnPromotionValue
protected java.util.Map mPromotionValueAdjustment
protected java.util.List mRelatedReplacementOrders
protected java.util.Collection mNonReturnItemCostAdjustments
protected java.util.List mItemPriceSources
protected java.util.Map<atg.commerce.promotion.GWPMultiHashKey,GiftWithPurchaseSelection> mGWPSelections
public ReturnRequest()
public ReturnRequest(Order pOrder)
public java.util.Map getDiscountableMap()
This Map is passed to all pricing operations on the working orders to preserve the original discountable state of the items.
public void setDiscountableMap(java.util.Map pDiscountableState)
public RepositoryItem getPriceList()
public void setPriceList(RepositoryItem pPriceList)
public RepositoryItem getSalePriceList()
public void setSalePriceList(RepositoryItem pSalePriceList)
public RepositoryItem getProfile()
This value is filled in when the return request is initialized based on the
profileId referenced by the Order
public void setProfile(RepositoryItem pProfile)
public atg.commerce.csr.returns.ReturnPaymentState getReturnPaymentState()
public void setReturnPaymentState(atg.commerce.csr.returns.ReturnPaymentState pReturnPaymentState)
pReturnPaymentState
- public StoreCredit getGeneratedStoreCredit()
public void setGeneratedStoreCredit(StoreCredit pGeneratedStoreCredit, RepositoryItem pItem)
pGeneratedStoreCredit
- the StoreCredit holder for the creditpItem
- the repository item for the store credit, if you have it it helps failoverpublic void setGeneratedStoreCredit(StoreCredit pGeneratedStoreCredit)
public RepositoryItem getGeneratedStoreCreditItem()
public double getOtherRefund()
public void setOtherRefund(double pOtherRefund)
pOtherRefund
- The otherRefund to set.public double getNonReturnItemSubtotalAdjustment()
totalItemRefund
based on the adjustments to non-return item's
amount, order discount share and manual adjustment share
This value is updated whenever the suggested amounts are (re)calculated for the return and when the return request is loaded from the repository.
Note that tax and shipping adjustments to non-return items are accounted for in the suggested and actual tax and shipping refund amounts.
This value is not persisted to the repository
public void setNonReturnItemSubtotalAdjustment(double pNonReturnItemSubtotalAdjustment)
pNonReturnItemSubtotalAdjustment
- The nonReturnItemRefundSubtotalAdjustment to set.public atg.commerce.csr.returns.ProcessName getProcessName()
ProcessName.Return
public void setProcessName(atg.commerce.csr.returns.ProcessName pProcessName)
pProcessName
- The processName to set.public void setActualShippingRefund(double pActualShippingRefund)
pActualShippingRefund
- the actual shipping cost refund amountpublic double getActualShippingRefund()
public void setActualTaxRefund(double pActualTaxRefund)
pActualTaxRefund
- the actual tax refund amountpublic double getActualTaxRefund()
public void setAuthorizationDate(java.util.Date pAuthorizationDate)
pAuthorizationDate
- the authorization datepublic java.util.Date getAuthorizationDate()
public void setAuthorizationNumber(java.lang.String pAuthorizationNumber)
pAuthorizationNumber
- the authorization numberpublic java.lang.String getAuthorizationNumber()
public void setComments(java.lang.String pComments)
pComments
- the comments about this returnpublic java.lang.String getComments()
protected void setOrder(Order pOrder)
pOrder
- the order that this return is related topublic Order getOrder()
public void setProcessed(boolean pProcessed)
pProcessed
- a boolean indicating if this request has been processedpublic boolean isProcessed()
public void setProcessImmediately(boolean pProcessImmediately)
pProcessImmediately
- a boolean indicating if this request should be processed immediatelypublic boolean isProcessImmediately()
public java.util.ArrayList<RefundMethod> getRefundMethodList()
protected void setReplacementOrder(Order pReplacementOrder)
pReplacementOrder
- the replacement orderpublic Order getReplacementOrder()
protected void setRequestId(java.lang.String pRequestId)
pRequestId
- the ID of the request that this object representspublic java.lang.String getRequestId()
public void setReturnFee(double pReturnFee)
pReturnFee
- the fee associated with a returnpublic double getReturnFee()
public java.util.ArrayList getReturnItemList()
public java.util.HashMap getReturnItemMap()
public java.util.ArrayList getShippingGroupList()
public java.util.HashMap getShippingGroupMap()
protected void setState(java.lang.String pState)
pState
- the state of this return requestpublic java.lang.String getState()
public java.lang.String getStateAsUserResource()
public java.lang.String getStateDetailAsUserResource()
protected void setSuggestedShippingRefund(double pSuggestedShippingRefund)
pSuggestedShippingRefund
- the suggested shipping cost refund amountpublic double getSuggestedShippingRefund()
protected void setSuggestedTaxRefund(double pSuggestedTaxRefund)
pSuggestedTaxRefund
- the suggested tax refund amountpublic double getSuggestedTaxRefund()
public java.lang.String getAgentId()
public void setAgentId(java.lang.String pAgentId)
pAgentId
- public java.lang.String getOriginOfReturn()
public void setOriginOfReturn(java.lang.String pOriginOfReturn)
pOriginOfReturn
- public double getAllocatedAmount()
This method walks through the refund methods and sums up the RefundMethod.getAmount()
.
If you want to turn on logging debug for this class, turn on GenericService.isLoggingDebug()
.
public double getTotalItemRefund()
nonReturnItemSubtotalAdjustment
value.
If you want to turn on logging debug for this class, turn on GenericService.isLoggingDebug()
.
public double getTotalReturnItemRefund()
This value is calculated by iterating over the return items and totaling the ReturnItem.getRefundAmount()
public double getRefundSubtotal()
public double getAdjustmentAmount()
The basic formula is: ActualShippingRefund + ActualTaxRefund + OtherRefund - ReturnFee
public double getTotalRefundAmount()
The basic formula is: RefundSubtotalAmount + TotalAdjustmentAmount
public double getUnallocatedAmount()
The basic formula is: TotalRefundAmount - TotalAllocatedAmount
getAllocatedAmount()
public long getReplaceItemCount()
public boolean isReplacingItems()
public long getReturnItemCount()
public boolean isReturningItems()
public boolean isExchangeProcess()
If the current process is the exchange process this method returns true. Otherwise returns false.
If the processName is not set on the ReturnRequest, this method checks to see, if there is an replacement
order. If there is an replacement order exists, then this method sets the processName as Exchange and returns
true. If there is no replacement order, then this method sets the processName as Return and returns false.
public boolean isReturnProcess()
If the current process is the return process this method returns true. Otherwise returns false.
If the processName is not set on the ReturnRequest, this method checks to see, if there is an replacement
order. If there is an replacement order exists, then this method sets the processName as Exchange and returns
false. If there is no replacement order, then this method sets the processName as Return and returns true.
public atg.commerce.csr.returns.ProcessName getCurrentProcessName()
public static ReturnRequest getInstance()
public static ReturnRequest getInstance(Order pOrder)
pOrder
- The order which is used to initialize ReturnShippingGroup
and ReturnItem
.public java.lang.Object[] getSortedRelatedReturnRequests()
public void setSortedRelatedReturnRequests(java.lang.Object[] pSortedRelatedReturnRequests)
public Order getReturnAdjustedOrder()
The return adjusted order provides a context in which all items still owned by the customer are put into a single order where they can be priced together
public void setReturnAdjustedOrder(Order pReturnAdjustedOrder)
public java.util.Map getOriginatingToRAOItemMap()
public void setOriginatingToRAOItemMap(java.util.Map pOriginatingToRAOItemMap)
public java.util.Map getRAOToOriginatingItemMap()
public void setRAOToOriginatingItemMap(java.util.Map pRAOToOriginatingItemMap)
public java.util.Map getOriginatingToRAOShippingGroupMap()
public void setOriginatingToRAOShippingGroupMap(java.util.Map pOriginatingToRAOShippingGroupMap)
public java.util.Map getRAOToOriginatingShippingGroupMap()
public void setRAOToOriginatingShippingGroupMap(java.util.Map pRAOToOriginatingShippingGroupMap)
public Order getReturnCalculationOrder()
The return calculation order provides a context in which all items still owned by the customer, minus the items being returned in the current request, are put into a single order where they can be priced together
public void setReturnCalculationOrder(Order pReturnCalculationOrder)
public java.util.Map getRAOToRCOItemMap()
public void setRAOToRCOItemMap(java.util.Map pRAOToRCOItemMap)
public java.util.Map getRCOToRAOItemMap()
public void setRCOToRAOItemMap(java.util.Map pRCOToRAOItemMap)
public java.util.Map getRAOToRCOShippingGroupMap()
public void setRAOToRCOShippingGroupMap(java.util.Map pRAOToRCOShippingGroupMap)
public java.util.Map getRCOToRAOShippingGroupMap()
public void setRCOToRAOShippingGroupMap(java.util.Map pRCOToRAOShippingGroupMap)
public Order getPromotionEvaluationOrder()
The promotion evaluation order provides a context in which all items still owned by the customer, minus the items being returned in the current request, are put into a single order along with the exchange items where they can be priced together
public void setPromotionEvaluationOrder(Order pPromotionEvaluationOrder)
public java.util.Map getRCOToPEOItemMap()
public void setRCOToPEOItemMap(java.util.Map pRCOToPEOItemMap)
public java.util.Map getPEOToRCOItemMap()
public void setPEOToRCOItemMap(java.util.Map pPEOToRCOItemMap)
public java.util.Map getPEOToRCOShippingGroupMap()
public void setPEOToRCOShippingGroupMap(java.util.Map pPEOToRCOShippingGroupMap)
public java.util.Map getRCOToPEOShippingGroupMap()
public void setRCOToPEOShippingGroupMap(java.util.Map pRCOToPEOShippingGroupMap)
public void setExchangeToPEOItemMap(java.util.Map pExchangeToPEOItemMap)
public java.util.Map getExchangeToPEOItemMap()
public java.util.Map getPEOToExchangeItemMap()
Note this map is generated whenever a new exchangeItemToPEOItemMap
is
set.
public void setReplacementToRAOItemMap(java.util.Map pReplacementToRAOItemMap)
public java.util.Map getReplacementToRAOItemMap()
public void setReplacementToRAOShippingGroupMap(java.util.Map pReplacementToRAOShippingGroupMap)
public java.util.Map getReplacementToRAOShippingGroupMap()
public java.util.Map getRAOToReplacementItemMap()
This Map is auto-generated whenever the replacementItemMap
is
set.
public java.util.Map getRAOToReplacementShippingGroupMap()
This Map is auto-generated whenever the replacementShippingGroupMap
is
set.
public void setExchangeToPEOShippingGroupMap(java.util.Map pExchangeToPEOShippingGroupMap)
public java.util.Map getExchangeToPEOShippingGroupMap()
public java.util.Map getPEOToExchangeShippingGroupMap()
Note this map is generated whenever a new exchangeShippingGroupToPEOShippingGroupMap
is
set.
public void setOriginatingOrder(Order pOriginatingOrder)
public Order getOriginatingOrder()
The originating order is the first order purchase from which all returns and exchanges originated.
pOriginatingOrder
- public java.util.Collection getItemPromotions()
public void setItemPromotions(java.util.Collection pItemPromotions)
public java.util.Collection getOrderPromotions()
public void setOrderPromotions(java.util.Collection pOrderPromotions)
public java.util.Map getExchangeOrderPromotionValue()
ExchangeOrderDiscountCalculator
to
apply order discounts to the exchange order.
This map is generated based on the value of order promotions against the replacement items in the promotion evaluation order
public void setExchangeOrderPromotionValue(java.util.Map pExchangeOrderPromotionValue)
public java.util.Map getExchangeManualAdjustmentValue()
ExchangeOrderAdjustmentCalculator
to
apply manual adjustments to the exchange order
This map is generated based on the value of manual adjustments against the replacement items in the promotion evaluation order
public void setExchangeManualAdjustmentValue(java.util.Map pExchangeManualAdjustmentValue)
public java.util.Map getShippingCostMap()
The values in this map are used to determine the shipping refund for return items.
public void setShippingCostMap(java.util.Map pShippingCostMap)
public java.util.Map getPreReturnPromotionValue()
This map is generated once at the start of the return and is used to calculate the change in promotion value by comparing to the promotion value in the Return Calculation Order or Promotion Evaluation Order, depending on whether a return or exchange is being done.
public void setPreReturnPromotionValue(java.util.Map pPreReturnPromotionValue)
public java.util.Map getPromotionValueAdjustments()
public void setPromotionValueAdjustments(java.util.Map pPromotionValueAdjustment)
public java.util.List getRelatedReplacementOrders()
sortedReturnRequests
It is used to determine all the items and shipping groups that should be added to the Return Adjusted Orders as well as determining the payment groups available to receive a refund.
public void setRelatedReplacementOrders(java.util.List pRelatedReplacementOrders)
public java.util.Collection getNonReturnItemCostAdjustments()
ItemCostAdjustment
objects
that were generated for items not being returned and
included when calculating the suggested refund amounts for the
return.public void addNonReturnItemCostAdjustment(ItemCostAdjustment pItemCostAdjustment)
ItemCostAdjustment
to the return.pItemCostAdjustment
- public void addNonReturnItemCostAdjustments(java.util.Collection pNonReturnItemCostAdjustments)
ItemCostAdjustment
objects to the return.pNonReturnItemCostAdjustments
- public void clearNonReturnItemCostAdjustments()
ItemCostAdjustment
objects from the returnpublic java.util.List getItemPriceSources()
ItemPriceSource
objects that are used
to price the working orders and the exchange order in the return.
This list is automatically generated for all returns and exchanges based on the original order and any exchange order in the return tree. This maintains the original prices for the items to avoid inaccurate refund calculations when product prices have changed since the purchase.
ItemPriceSource
objectspublic void setItemPriceSources(java.util.List pItemPriceSources)
ItemPriceSource
objects that are used
to price the working orders and the exchange order in the return.public java.util.Map<atg.commerce.promotion.GWPMultiHashKey,GiftWithPurchaseSelection> getGWPSelections()
GiftWithPurchaseSelection
objects are generated based on
the gwp items that are being exchanged. These are used to present selection
links on the exchange order cart page.
The objects are generated whenever return items are selected by the agent.
ReturnManager.generateGWPSelectionsForReturnItems(ReturnRequest)
,
ReturnManager.generateFilteredReturnRequestSelections(ReturnRequest)
,
atg.commerce.csr.promotion.CSRGiftWithPurchaseSelectionsDroplet
public void setGWPSelections(java.util.Map<atg.commerce.promotion.GWPMultiHashKey,GiftWithPurchaseSelection> pGWPSelections)
public void loadReturnRequest(RepositoryItem pSource) throws ReturnException
pSource
- The information to be copied from.ReturnException
public void saveReturnRequest(MutableRepositoryItem pDestination) throws ReturnException
pDestination
- The information to be copiedReturnException
public java.lang.String toString()
toString
in class java.lang.Object