Class TransactionExecutionResponse
- java.lang.Object
-
- com.broadleafcommerce.orderoperation.service.provider.external.domain.payment.TransactionExecutionResponse
-
- All Implemented Interfaces:
Serializable
public class TransactionExecutionResponse extends Object implements Serializable
Response object describing the resulting transaction details andPaymentSummary.- Author:
- Chris Kittrell (ckittrell)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TransactionExecutionResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)javax.money.MonetaryAmountgetAdjustmentsTotal()The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.javax.money.MonetaryAmountgetAmountAwaitingResult()Gets the total amount that was successfully queued by the gateway, but has not yet been executed.javax.money.MonetaryAmountgetAmountFailedToExecute()Gets the total amount that failed to execute.javax.money.MonetaryAmountgetAmountSuccessfullyExecuted()Gets the total amount that was successfully executed.javax.money.CurrencyUnitgetCurrency()The currency gathered fromgetPaymentSummary()orgetExpectedTotalAmount().javax.money.MonetaryAmountgetExpectedTotalAmount()The total amount that we're expecting to be executed against thepaymentSummary, spread across thetransactionExecutionDetails.javax.money.MonetaryAmountgetFulfillmentTotal()The payment's total fulfillment costStringgetPaymentId()PaymentSummarygetPaymentSummary()The payment's updatedPaymentSummaryrepresentation.StringgetRequestId()The id representing the customer's request to execute one or more transactions.javax.money.MonetaryAmountgetSubtotal()The payment's total usually excluding adjustments, tax, and shipping.javax.money.MonetaryAmountgetTaxTotal()The payment's total tax costList<TransactionExecutionDetail>getTransactionExecutionDetails()A list ofTransactionExecutionDetailsdescribing the transactions executed.StringgetTransactionType()The type of transactions that were executed.inthashCode()booleanisIndeterminateResult()Whether any of the transactions has an indeterminate result.voidsetAdjustmentsTotal(javax.money.MonetaryAmount adjustmentsTotal)The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.voidsetExpectedTotalAmount(javax.money.MonetaryAmount expectedTotalAmount)The total amount that we're expecting to be executed against thepaymentSummary, spread across thetransactionExecutionDetails.voidsetFulfillmentTotal(javax.money.MonetaryAmount fulfillmentTotal)The payment's total fulfillment costvoidsetPaymentSummary(PaymentSummary paymentSummary)The payment's updatedPaymentSummaryrepresentation.voidsetRequestId(String requestId)The id representing the customer's request to execute one or more transactions.voidsetSubtotal(javax.money.MonetaryAmount subtotal)The payment's total usually excluding adjustments, tax, and shipping.voidsetTaxTotal(javax.money.MonetaryAmount taxTotal)The payment's total tax costvoidsetTransactionExecutionDetails(List<TransactionExecutionDetail> transactionExecutionDetails)A list ofTransactionExecutionDetailsdescribing the transactions executed.voidsetTransactionType(String transactionType)The type of transactions that were executed.StringtoString()booleanwasSuccessful()Whether all the transactions were successful based onTransactionExecutionDetail.wasSuccessful().
-
-
-
Method Detail
-
wasSuccessful
public boolean wasSuccessful()
Whether all the transactions were successful based onTransactionExecutionDetail.wasSuccessful().- Returns:
- Whether or not all the transactions were successfull.
- See Also:
TransactionExecutionDetail.wasSuccessful()
-
isIndeterminateResult
public boolean isIndeterminateResult()
Whether any of the transactions has an indeterminate result.- Returns:
- Whether or not any of the transactions has an indeterminate result
-
getAmountSuccessfullyExecuted
public javax.money.MonetaryAmount getAmountSuccessfullyExecuted()
Gets the total amount that was successfully executed.- Returns:
- The total amount that was successfully executed.
-
getAmountFailedToExecute
public javax.money.MonetaryAmount getAmountFailedToExecute()
Gets the total amount that failed to execute.- Returns:
- The total amount that failed to execute.
-
getAmountAwaitingResult
public javax.money.MonetaryAmount getAmountAwaitingResult()
Gets the total amount that was successfully queued by the gateway, but has not yet been executed.- Returns:
- The total amount that was successfully queued by the gateway, but has not yet been executed.
-
getCurrency
@Nullable public javax.money.CurrencyUnit getCurrency()
The currency gathered fromgetPaymentSummary()orgetExpectedTotalAmount().- Returns:
- The currency gathered from the payment summary or expected total amount.
-
getPaymentId
@Nullable public String getPaymentId()
-
getPaymentSummary
@Nullable public PaymentSummary getPaymentSummary()
The payment's updatedPaymentSummaryrepresentation.This can be null if the payment is archived as a result of a failed transaction.
- Returns:
- The payment's updated
PaymentSummaryrepresentation.
-
getTransactionType
public String getTransactionType()
The type of transactions that were executed.- Returns:
- The type of transactions that were executed.
- See Also:
TransactionType
-
getTransactionExecutionDetails
public List<TransactionExecutionDetail> getTransactionExecutionDetails()
A list ofTransactionExecutionDetailsdescribing the transactions executed.Typically there will only be multiple transactions being executed if there're multiple parent transactions being executed against. This scenario is very unlikely and not expected out of box for non-refund type transactions, however it is supported.
- Returns:
- A list of
TransactionExecutionDetailsdescribing the transactions executed.
-
getRequestId
public String getRequestId()
The id representing the customer's request to execute one or more transactions.- Returns:
- The id representing the customer's request to execute one or more transactions.
-
getExpectedTotalAmount
public javax.money.MonetaryAmount getExpectedTotalAmount()
The total amount that we're expecting to be executed against thepaymentSummary, spread across thetransactionExecutionDetails. This amount must be valid according to what's available for thepaymentSummary. If specified, the amount details (subtotal,adjustmentsTotal,fulfillmentTotal, &taxTotal) should sum together to equal this amount.- Returns:
- The total amount that we're expecting to execute against the
paymentSummary, spread across thetransactionExecutionDetails.
-
getSubtotal
public javax.money.MonetaryAmount getSubtotal()
The payment's total usually excluding adjustments, tax, and shipping.- Returns:
- The payment's total usually excluding adjustments, tax, and shipping.
-
getAdjustmentsTotal
public javax.money.MonetaryAmount getAdjustmentsTotal()
The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.- Returns:
- The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.
-
getFulfillmentTotal
public javax.money.MonetaryAmount getFulfillmentTotal()
The payment's total fulfillment cost- Returns:
- The payment's total fulfillment cost
-
getTaxTotal
public javax.money.MonetaryAmount getTaxTotal()
The payment's total tax cost- Returns:
- The payment's total tax cost
-
setPaymentSummary
public void setPaymentSummary(@Nullable PaymentSummary paymentSummary)The payment's updatedPaymentSummaryrepresentation.This can be null if the payment is archived as a result of a failed transaction.
- Parameters:
paymentSummary- The payment's updatedPaymentSummaryrepresentation.
-
setTransactionType
public void setTransactionType(String transactionType)
The type of transactions that were executed.- Parameters:
transactionType- The type of transactions that were executed.- See Also:
TransactionType
-
setTransactionExecutionDetails
public void setTransactionExecutionDetails(List<TransactionExecutionDetail> transactionExecutionDetails)
A list ofTransactionExecutionDetailsdescribing the transactions executed.Typically there will only be multiple transactions being executed if there're multiple parent transactions being executed against. This scenario is very unlikely and not expected out of box for non-refund type transactions, however it is supported.
- Parameters:
transactionExecutionDetails- A list ofTransactionExecutionDetailsdescribing the transactions executed.
-
setRequestId
public void setRequestId(String requestId)
The id representing the customer's request to execute one or more transactions.- Parameters:
requestId- The id representing the customer's request to execute one or more transactions.
-
setExpectedTotalAmount
public void setExpectedTotalAmount(javax.money.MonetaryAmount expectedTotalAmount)
The total amount that we're expecting to be executed against thepaymentSummary, spread across thetransactionExecutionDetails. This amount must be valid according to what's available for thepaymentSummary. If specified, the amount details (subtotal,adjustmentsTotal,fulfillmentTotal, &taxTotal) should sum together to equal this amount.- Parameters:
expectedTotalAmount- The total amount that we're expecting to execute against thepaymentSummary, spread across thetransactionExecutionDetails.
-
setSubtotal
public void setSubtotal(javax.money.MonetaryAmount subtotal)
The payment's total usually excluding adjustments, tax, and shipping.
-
setAdjustmentsTotal
public void setAdjustmentsTotal(javax.money.MonetaryAmount adjustmentsTotal)
The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.
-
setFulfillmentTotal
public void setFulfillmentTotal(javax.money.MonetaryAmount fulfillmentTotal)
The payment's total fulfillment cost
-
setTaxTotal
public void setTaxTotal(javax.money.MonetaryAmount taxTotal)
The payment's total tax cost
-
canEqual
protected boolean canEqual(Object other)
-
-