com.ibm.etill.framework.cassette
Class OrderRequest

java.lang.Object
  |
  +--com.ibm.etill.framework.cassette.CassetteRequest
        |
        +--com.ibm.etill.framework.cassette.APIRequest
              |
              +--com.ibm.etill.framework.cassette.OrderRequest
All Implemented Interfaces:
FrameworkReturnCodes, PaymentAPIConstants, Serializable
Direct Known Subclasses:
AcceptPaymentRequest, ApprovalExpirationRequest, CancelOrderRequest, CloseOrderRequest, PaymentTransactionRequest, ReceivePaymentRequest

public class OrderRequest
extends APIRequest

OrderRequest extends APIRequest and provides a base class for all API requests which operate on Orders. The following order-related data members are added to the hierarchy through this class, along with the required accessor methods:

When OrderRequest objects are sent to a cassette for processing, the Framework will obtain the following locks while the request is being processed. This ensures thread safety and data integrity acrosss this request and all other operations being simultaneously performed within Commerce Payments:
ObjectLock TypeEffect
Order Write Prevents any other activity for the order
AccountAdmin Read Prevents a BATCHCLOSE operation from beginning. This lock is only obtained if the batchLock indicator is set to true. The requests that do this are:
  • DepositRequest
  • DepositReversalRequest
  • RefundRequest
  • RefundReversalRequest
  • Approve with DEPOSITFLAG=1
  • AcceptPayment with APPROVEFLAG=1 and DEPOSITFLAG=1
  • ReceivePayment with APPROVEFLAG=1 and DEPOSITFLAG=1
MerchantAdmin Read Prevents any significant configuration changes to the merchant
Cassette Read Prevents any significant configuration changes to the cassette
PayServer Read Prevents any significant configuration changes to Commerce Payments

See Also:
AccountAdmin, MerchantAdmin, APIResponse, Order, Serialized Form

 
Method Summary
 AccountAdmin getAccount()
          Returns the AccountAdmin object that is associated with the subject Order.
 String getAccountNumber()
          Returns the account number of the account associated with the subject Order.
 String getBatchNumber()
          Returns the batch number of the batch to which any transaction generated by this OrderRequest will be assigned.
 MerchantAdmin getMerchant()
          Returns the MerchantAdmin object to which the subject Order belongs.
 Order getOrder()
          Returns the Order object at which this request is directed.
 
Methods inherited from class com.ibm.etill.framework.cassette.APIRequest
getFrameworkKeywords, getProtocolData
 
Methods inherited from class com.ibm.etill.framework.cassette.CassetteRequest
getConnection, getToken, obtainLocks, releaseLocks
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getOrder

public final Order getOrder()
Returns the Order object at which this request is directed.
Returns:
Order - the generic Order object at which the API request is directed.

getAccount

public final AccountAdmin getAccount()
Returns the AccountAdmin object that is associated with the subject Order.
Returns:
AccountAdmin - the generic account object through which the Order will be processed. If the Order has not yet been associated with an account, then this method returns null.

getMerchant

public final MerchantAdmin getMerchant()
Returns the MerchantAdmin object to which the subject Order belongs.
Returns:
MerchantAdmin - the generic merchant object to which the subject Order belongs.

getAccountNumber

public final String getAccountNumber()
Returns the account number of the account associated with the subject Order.
Returns:
String - the account number of the account through which the subject Order will be processed.

getBatchNumber

public final String getBatchNumber()
Returns the batch number of the batch to which any transaction generated by this OrderRequest will be assigned.
Returns:
String - the batch number