com.ibm.etill.kitcashcassette
Class KitCashPaymentRequest

java.lang.Object
  |
  +--com.ibm.etill.framework.cassette.CassetteRequest
        |
        +--com.ibm.etill.framework.cassette.ProtocolRequest
              |
              +--com.ibm.etill.kitcashcassette.KitCashPaymentRequest
All Implemented Interfaces:
java.io.Serializable

public class KitCashPaymentRequest
extends com.ibm.etill.framework.cassette.ProtocolRequest

KitCashPaymentRequest objects encapsulate payment information send from a consumer's KitCash wallet to the KitCash cassette.

When a KitCash wallet sends a message to the KitCashComPoints, the Payment Manager framework creates a new KitCashConnection object and asks the KitCash cassette to construct a protocol request from it. The framework will subsequently send this request to the KitCash cassette's service(ProtocolRequest, ProtcolResponse) method for processing.

See Also:
com.ibm.etill.kitcashcassette.KitCashCassette#createProtocolRequest(com.ibm.etill.framework.io.ETillDataStream), KitCashCassette.service(com.ibm.etill.framework.cassette.CassetteRequest, com.ibm.etill.framework.cassette.CassetteResponse), Serialized Form

Fields inherited from class com.ibm.etill.framework.cassette.ProtocolRequest
account, merchant
 
Fields inherited from class com.ibm.etill.framework.cassette.CassetteRequest
monitors, NoLock, ReadLock, WriteLock
 
Constructor Summary
KitCashPaymentRequest(com.ibm.etill.framework.io.ETillConnection etc)
          Constructs a new KitCashPaymentRequest object containing the necessary information for the framework to be able to make a service(ProtocolRequest, ProtocolResonse) call on the KitCash cassette.
 
Method Summary
 int getAmount()
          Returns the cash transfer amount from the message wrapper
 java.lang.String getMerchantNumber()
          Returns the merchant ID associated with this KitCash protocol request
 KitCashMessage getMessage()
          Returns the KitCash message associated with this KitCash protocol request
 java.lang.String getOrderNumber()
          Returns the order number associated with this KitCash protocol request
 java.lang.String toString()
          Returns a string representation of the KitCash protocol request
 
Methods inherited from class com.ibm.etill.framework.cassette.ProtocolRequest
getAccount, getOrder, obtainLocks, setBatchLock
 
Methods inherited from class com.ibm.etill.framework.cassette.CassetteRequest
addMonitor, clearMonitors, getConnection, getToken, releaseLocks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KitCashPaymentRequest

public KitCashPaymentRequest(com.ibm.etill.framework.io.ETillConnection etc)
Constructs a new KitCashPaymentRequest object containing the necessary information for the framework to be able to make a service(ProtocolRequest, ProtocolResonse) call on the KitCash cassette.

The connection object is used to read a KitCash message from the KitCash wallet. The KitCash message is contained within a KitCashMessageWrapper which wraps the message with a MIME header. This KitCashMessageWrapper object can be queried to determine the merchant ID and order number the message relates to as well to get the KitCash message itself.

Parameters:
etc - the connection with the KitCash wallet
See Also:
KitCashConnection.read()
Method Detail

getAmount

public int getAmount()
Returns the cash transfer amount from the message wrapper

getMerchantNumber

public java.lang.String getMerchantNumber()
Returns the merchant ID associated with this KitCash protocol request
Returns:
the merchant ID associated with this KitCash protocol request

getMessage

public KitCashMessage getMessage()
Returns the KitCash message associated with this KitCash protocol request
Returns:
the KitCash message associated with this KitCash protocol request

getOrderNumber

public java.lang.String getOrderNumber()
Returns the order number associated with this KitCash protocol request
Returns:
the order number associated with this KitCash protocol request

toString

public java.lang.String toString()
Returns a string representation of the KitCash protocol request
Overrides:
toString in class java.lang.Object
Returns:
a string representation of the KitCash protocol request