com.ibm.etill.framework.cassette
Class ApproveRequest
java.lang.Object
|
+--com.ibm.etill.framework.cassette.CassetteRequest
|
+--com.ibm.etill.framework.cassette.APIRequest
|
+--com.ibm.etill.framework.cassette.OrderRequest
|
+--com.ibm.etill.framework.cassette.PaymentTransactionRequest
|
+--com.ibm.etill.framework.cassette.ApproveRequest
- All Implemented Interfaces:
- FrameworkReturnCodes, PaymentAPIConstants, Serializable
- public class ApproveRequest
- extends PaymentTransactionRequest
ApproveRequest objects hold all the information necessary for a
cassette to process a given APPROVE API command.
Since the APPROVE API command operates on a Payment (specifically, it
creates a new payment), ApproveRequest extends PaymentTransactionRequest.
- See Also:
APIResponse
, Serialized Form
Method Summary |
boolean |
getDepositFlag()
Indicates whether automatic deposit was requested in the APPROVE
command string. |
boolean |
getSplitsAllowed()
Deprecated. If needed, SplitAllowed should be obtained from protocol data |
ApproveRequest
public ApproveRequest(ETillConnection connection,
Payment payment,
Amount amount,
boolean splitAllowed,
boolean autoDeposit,
String batchNumber,
ParameterTable frameworkKeywords,
ParameterTable protocolData)
throws ETillAbortOperation
- Constructs an ApproveRequest object which references or contains all of
the specified input parameters.
The Framework invokes this constructor every time a new APPROVE command
is received from a merchant application.
Cassettes may also need to construct ApproveRequest objects in order to
process the automatic approval option of ACCEPTPAYMENT or RECEIVEPAYMENT.
- Parameters:
connection
- the ETillConnection object over which the
APPROVE command was sent from the
merchant application to Commerce Payments.payment
- the Payment object that the Framework created
and initialized before calling this constructor.amount
- the Amount object containing the amount,
amountExp10 and currency values from the
command stringsplitAllowed
- a boolean value that reflects the effective
setting of the SPLITALLOWED parameter from the
command string. true
indicates
that split payments are allowed and false
indicates that they are not allowed.autoDeposit
- a boolean value that indicates whether automatic
deposit was requested in the command string.
true
indicates that automatic deposit
was requested and false
indicates that
it was not.batchNumber
- a String that contains the batchNumber with which
the automatic deposit is to be associated. This
parameter is only significant if the
autoDeposit
flag is true
.frameworkKeywords
- a ParameterTable that contains the generic command
parameters that were specified on the command
string.protocolData
- a ParameterTable that contains the protocol data
parameters that were specified on the command
string. If no such parameters were specified,
then this value will be null.- Throws:
ETillAbortOperation
- may be thrown by one of the ancestor classes'
constructors.
getDepositFlag
public final boolean getDepositFlag()
- Indicates whether automatic deposit was requested in the APPROVE
command string.
- Returns:
- boolean -
true
if autodeposit was requested,
false
if not
getSplitsAllowed
public final boolean getSplitsAllowed()
- Deprecated. If needed, SplitAllowed should be obtained from protocol data
- Returns the SPLITALLOWED setting from the APPROVE command string.
- Returns:
- boolean -
true
if the command string indicated that
split payments should be allowed, false
if not