Class TransactionExecutionResponse
java.lang.Object
com.broadleafcommerce.paymenttransaction.web.endpoint.domain.TransactionExecutionResponse
- All Implemented Interfaces:
Serializable
Response object describing the resulting transaction details and
PaymentSummary.- Author:
- Chris Kittrell (ckittrell)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanjavax.money.MonetaryAmountThe payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.javax.money.MonetaryAmountGets the total amount that failed to execute.javax.money.MonetaryAmountGets the total amount that was successfully executed.javax.money.CurrencyUnitThe currency gathered fromgetPaymentSummary()orgetExpectedTotalAmount().javax.money.MonetaryAmountThe total amount that we're expecting to be executed against thePayment, spread across thetransactionExecutionDetails.javax.money.MonetaryAmountThe total fees related to theexpectedTotalAmountjavax.money.MonetaryAmountThe payment's total fulfillment cost.javax.money.MonetaryAmountThe amount of taxes that are included in the subtotal (VAT).The list of all payments for the owning entity (e.g.ThePayment'supdatedPaymentSummaryrepresentation.The id representing the customer's request to execute one or more transactions.javax.money.MonetaryAmountThe payment's total usually excluding adjustments, tax, fees, and shipping.javax.money.MonetaryAmountThe payment's total tax cost.A list ofTransactionExecutionDetailsdescribing the transactions executed.The type of transactions that were executed.inthashCode()booleanWhether any of the transactions are flagged for manual review based onTransactionExecutionDetail.isFlaggedForManualReview().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 thePayment, spread across thetransactionExecutionDetails.voidsetFeesTotal(javax.money.MonetaryAmount feesTotal) The total fees related to theexpectedTotalAmountvoidsetFulfillmentTotal(javax.money.MonetaryAmount fulfillmentTotal) The payment's total fulfillment cost.voidsetIncludedTaxTotal(javax.money.MonetaryAmount includedTaxTotal) The amount of taxes that are included in the subtotal (VAT).voidsetOwningEntityPayments(List<PaymentSummary> owningEntityPayments) The list of all payments for the owning entity (e.g.voidsetPaymentSummary(PaymentSummary paymentSummary) ThePayment'supdatedPaymentSummaryrepresentation.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, fees, and shipping.voidsetTaxTotal(javax.money.MonetaryAmount taxTotal) The payment's total tax cost.voidsetTransactionExecutionDetails(List<TransactionExecutionDetail> transactionExecutionDetails) A list ofTransactionExecutionDetailsdescribing the transactions executed.voidsetTransactionType(String transactionType) The type of transactions that were executed.toString()booleanWhether all the transactions were successful based onTransactionExecutionDetail.wasSuccessful().
-
Constructor Details
-
TransactionExecutionResponse
public TransactionExecutionResponse()
-
-
Method Details
-
wasSuccessful
public boolean wasSuccessful()Whether all the transactions were successful based onTransactionExecutionDetail.wasSuccessful().- Returns:
- Whether or not all the transactions were successfull.
- See Also:
-
hasTransactionFlaggedForManualReview
public boolean hasTransactionFlaggedForManualReview()Whether any of the transactions are flagged for manual review based onTransactionExecutionDetail.isFlaggedForManualReview().- Returns:
- Whether any of the transactions are flagged for manual review.
- See Also:
-
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.
-
getCurrency
@Nullable public javax.money.CurrencyUnit getCurrency()The currency gathered fromgetPaymentSummary()orgetExpectedTotalAmount().- Returns:
- The currency gathered from the payment summary or expected total amount.
-
getPaymentSummary
ThePayment'supdatedPaymentSummaryrepresentation.This can be null if the
Paymentis archived as a result of a failed transaction.- Returns:
- The
Payment'supdatedPaymentSummaryrepresentation.
-
getOwningEntityPayments
The list of all payments for the owning entity (e.g. Cart). This list is returned if the request containshydrateOwningEntityPayments=trueparameter.- Returns:
- all payments for the owning entity (e.g. Cart)
-
getTransactionType
The type of transactions that were executed.- Returns:
- The type of transactions that were executed.
- See Also:
-
TransactionType
-
getTransactionExecutionDetails
A list ofTransactionExecutionDetailsdescribing the transactions executed.- Returns:
- A list of
TransactionExecutionDetailsdescribing the transactions executed.
-
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 thePayment, spread across thetransactionExecutionDetails. This amount must be valid according to what's available for thePayment. If specified, the amount details should be equal to this amount using the following equation: transactionAmount =subtotal+fulfillmentTotal+feesTotal-adjustmentsTotal+taxTotal-includedTaxTotal.- Returns:
- The total amount that we're expecting to execute against the
Payment, spread across thetransactionExecutionDetails.
-
getSubtotal
public javax.money.MonetaryAmount getSubtotal()The payment's total usually excluding adjustments, tax, fees, and shipping.- Returns:
- The payment's total usually excluding adjustments, tax, fees, 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.
-
getFeesTotal
public javax.money.MonetaryAmount getFeesTotal()The total fees related to theexpectedTotalAmount- Returns:
- The total fees related to the
expectedTotalAmount
-
getTaxTotal
public javax.money.MonetaryAmount getTaxTotal()The payment's total tax cost.- Returns:
- The payment's total tax cost.
-
getIncludedTaxTotal
public javax.money.MonetaryAmount getIncludedTaxTotal()The amount of taxes that are included in the subtotal (VAT).- Returns:
- The amount of taxes that are included in the subtotal (VAT).
-
setPaymentSummary
ThePayment'supdatedPaymentSummaryrepresentation.This can be null if the
Paymentis archived as a result of a failed transaction.- Parameters:
paymentSummary- ThePayment'supdatedPaymentSummaryrepresentation.
-
setOwningEntityPayments
The list of all payments for the owning entity (e.g. Cart). This list is returned if the request containshydrateOwningEntityPayments=trueparameter.- Parameters:
owningEntityPayments- all payments for the owning entity (e.g. Cart)
-
setTransactionType
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.- Parameters:
transactionExecutionDetails- A list ofTransactionExecutionDetailsdescribing the transactions executed.
-
setRequestId
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 thePayment, spread across thetransactionExecutionDetails. This amount must be valid according to what's available for thePayment. If specified, the amount details should be equal to this amount using the following equation: transactionAmount =subtotal+fulfillmentTotal+feesTotal-adjustmentsTotal+taxTotal-includedTaxTotal.- Parameters:
expectedTotalAmount- The total amount that we're expecting to execute against thePayment, spread across thetransactionExecutionDetails.
-
setSubtotal
public void setSubtotal(javax.money.MonetaryAmount subtotal) The payment's total usually excluding adjustments, tax, fees, and shipping.- Parameters:
subtotal- The payment's total usually excluding adjustments, tax, fees, and shipping.
-
setAdjustmentsTotal
public void setAdjustmentsTotal(javax.money.MonetaryAmount adjustmentsTotal) The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.- Parameters:
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.- Parameters:
fulfillmentTotal- The payment's total fulfillment cost.
-
setFeesTotal
public void setFeesTotal(javax.money.MonetaryAmount feesTotal) The total fees related to theexpectedTotalAmount- Parameters:
feesTotal- The total fees related to theexpectedTotalAmount
-
setTaxTotal
public void setTaxTotal(javax.money.MonetaryAmount taxTotal) The payment's total tax cost.- Parameters:
taxTotal- The payment's total tax cost.
-
setIncludedTaxTotal
public void setIncludedTaxTotal(javax.money.MonetaryAmount includedTaxTotal) The amount of taxes that are included in the subtotal (VAT).- Parameters:
includedTaxTotal- The amount of taxes that are included in the subtotal (VAT).
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-