atg.commerce.csr.returns
Class CreditCardRefundMethod

java.lang.Object
  extended by atg.commerce.csr.returns.RefundMethod
      extended by atg.commerce.csr.returns.CreditCardRefundMethod
All Implemented Interfaces:
java.io.Serializable

public class CreditCardRefundMethod
extends RefundMethod

This component encapsulates data for a credit card refund

The #saveRefundMethod(RepositoryItem, Order) is used to load refund method properties from repository item. if you add additional properties to refund method and it needs to be loaded to the refund method object, you need to extend this method.

The saveRefundMethod(MutableRepositoryItem) is used to save refund method properties to repository item. if you add additional properties to refund method and it needs to be saved in the repository, you need to extend this method.

See Also:
loadRefundMethod(RepositoryItem, Order), saveRefundMethod(MutableRepositoryItem), Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from class atg.commerce.csr.returns.RefundMethod
CREDIT_CARD_TYPE, mMaximumRefundAmount, NO_LIMIT, RETURN_MANAGER_PATH, STORE_CREDIT_TYPE, UNKNOWN_TYPE
 
Constructor Summary
CreditCardRefundMethod()
          Construct this object
CreditCardRefundMethod(CreditCard pCreditCard)
          Construct this object using a specific credit card
CreditCardRefundMethod(CreditCard pCreditCard, double pAmount)
          Construct this object with a specific credit card and amount
CreditCardRefundMethod(java.lang.String pType)
          Construct this object using a given type
 
Method Summary
 CreditCard getCreditCard()
          Returns credit card related to this record
 java.lang.String getCreditCardSuffix()
          Returns the last four digits of this credit card's number
static CreditCardRefundMethod getInstance()
          Deprecated.  
static CreditCardRefundMethod getInstance(CreditCard pCreditCard)
          Deprecated.  
 void loadRefundMethod(RepositoryItem pSource, Order pOrder)
          This method is used to copy the information from the source refund method repository item to refund method instance.
 void saveRefundMethod(MutableRepositoryItem pDestination)
          This method is used to copy the information from refund method instance to repository item.
protected  void setCreditCard(CreditCard pCreditCard)
          Sets the credit card related to this record
 
Methods inherited from class atg.commerce.csr.returns.RefundMethod
getAmount, getMaximumRefundAmount, getRefundType, getReturnManager, setAmount, setMaximumRefundAmount, setRefundType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

CreditCardRefundMethod

public CreditCardRefundMethod()
Construct this object

See Also:
CreditCardRefundMethod(CreditCard, double)

CreditCardRefundMethod

public CreditCardRefundMethod(CreditCard pCreditCard)
Construct this object using a specific credit card

See Also:
CreditCardRefundMethod(CreditCard, double)

CreditCardRefundMethod

public CreditCardRefundMethod(java.lang.String pType)
Construct this object using a given type

See Also:
CreditCardRefundMethod(CreditCard, double)

CreditCardRefundMethod

public CreditCardRefundMethod(CreditCard pCreditCard,
                              double pAmount)
Construct this object with a specific credit card and amount

Method Detail

setCreditCard

protected void setCreditCard(CreditCard pCreditCard)
Sets the credit card related to this record

Parameters:
pCreditCard - the credit card

getCreditCard

public CreditCard getCreditCard()
Returns credit card related to this record


getCreditCardSuffix

public java.lang.String getCreditCardSuffix()
Returns the last four digits of this credit card's number

Returns:
String the last four digits of the credit card number

getInstance

public static CreditCardRefundMethod getInstance(CreditCard pCreditCard)
Deprecated. 

This method calls #CreditCardRefundMethod(CreditCard)) to create
instance of CreditCardRefundMethod.

Returns:
CreditCardRefundMethod

getInstance

public static CreditCardRefundMethod getInstance()
Deprecated. 

This method calls #CreditCardRefundMethod()) to create
instance of CreditCardRefundMethod.

Returns:
CreditCardRefundMethod

loadRefundMethod

public void loadRefundMethod(RepositoryItem pSource,
                             Order pOrder)
                      throws ReturnException
This method is used to copy the information from the source refund method repository item to refund method instance.

This method calls superloadRefundMethod(RepositoryItem, Order) to copy base class properties and sets the creditCard property.

Overrides:
loadRefundMethod in class RefundMethod
Parameters:
pOrder - Credit Card refund method has reference to the payment group. This pOrder is used to load the payment group.
pSource - The information to be copied from.
Throws:
ReturnException
See Also:
#loadRefundMethod(RepositoryItem, Order)}

saveRefundMethod

public void saveRefundMethod(MutableRepositoryItem pDestination)
                      throws ReturnException
This method is used to copy the information from refund method instance to repository item.

This method calls supersaveRefundMethod(MutableRepositoryItem) to copy base class properties and sets the ReturnTools.getPaymentGroupIdPropertyName() in the repository item.

Overrides:
saveRefundMethod in class RefundMethod
Parameters:
pDestination - The information to be copied
Throws:
ReturnException
See Also:
#saveRefundMethod(MutableRepositoryItem)}