java.lang.Object
com.broadleafcommerce.cartoperation.service.provider.external.domain.payment.TransactionExecutionResponse
All Implemented Interfaces:
Serializable

public class TransactionExecutionResponse extends Object implements Serializable
Response object describing the resulting transaction details and PaymentSummary.
Author:
Chris Kittrell (ckittrell)
See Also:
  • Constructor Details

    • TransactionExecutionResponse

      public TransactionExecutionResponse()
  • Method Details

    • wasSuccessful

      public boolean wasSuccessful()
      Whether all the transactions were successful based on TransactionExecutionDetail.wasSuccessful().
      Returns:
      Whether or not all the transactions were successful.
      See Also:
    • hasTransactionAwaitingResult

      public boolean hasTransactionAwaitingResult()
      Whether any of the transactions are awaiting result based on TransactionExecutionDetail.isAwaitingResult().
      Returns:
      Whether or not all the transactions are awaiting result.
      See Also:
    • hasTransactionFlaggedForManualReview

      public boolean hasTransactionFlaggedForManualReview()
      Whether any of the transactions have been flagged for manual review based on TransactionExecutionDetail.isFlaggedForManualReview().
      Returns:
      Whether any of the transactions have been flagged for manual review.
      See Also:
    • getPaymentId

      @Nullable public String getPaymentId()
    • getTransactionIds

      public List<String> getTransactionIds()
    • getPaymentSummary

      @Nullable public PaymentSummary getPaymentSummary()
      The updated PaymentSummary representation.

      This can be null if the payment is archived as a result of a failed transaction.

      Returns:
      The updated PaymentSummary representation.
    • getOwningEntityPayments

      public List<PaymentSummary> getOwningEntityPayments()
      The list of all payments for the owning entity (e.g. Cart). This list is returned if the request contains hydrateOwningEntityPayments=true parameter.
      Returns:
      all payments for the owning entity (e.g. Cart)
    • getTransactionType

      public String getTransactionType()
      The type of transactions that were executed.
      Returns:
      The type of transactions that were executed.
      See Also:
    • getTransactionExecutionDetails

      public List<TransactionExecutionDetail> getTransactionExecutionDetails()
      A list of TransactionExecutionDetails describing the transactions executed.
      Returns:
      A list of TransactionExecutionDetails describing 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 the payment, spread across the transactionExecutionDetails. This amount must be valid according to what's available for the payment. 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 payment, spread across the transactionExecutionDetails.
    • 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 the expectedTotalAmount
      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

      public void setPaymentSummary(@Nullable PaymentSummary paymentSummary)
      The updated PaymentSummary representation.

      This can be null if the payment is archived as a result of a failed transaction.

      Parameters:
      paymentSummary - The updated PaymentSummary representation.
    • setOwningEntityPayments

      public void setOwningEntityPayments(List<PaymentSummary> owningEntityPayments)
      The list of all payments for the owning entity (e.g. Cart). This list is returned if the request contains hydrateOwningEntityPayments=true parameter.
      Parameters:
      owningEntityPayments - all payments for the owning entity (e.g. Cart)
    • setTransactionType

      public void setTransactionType(String transactionType)
      The type of transactions that were executed.
      Parameters:
      transactionType - The type of transactions that were executed.
      See Also:
    • setTransactionExecutionDetails

      public void setTransactionExecutionDetails(List<TransactionExecutionDetail> transactionExecutionDetails)
      A list of TransactionExecutionDetails describing the transactions executed.
      Parameters:
      transactionExecutionDetails - A list of TransactionExecutionDetails describing 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 the payment, spread across the transactionExecutionDetails. This amount must be valid according to what's available for the payment. 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 the payment, spread across the transactionExecutionDetails.
    • 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 the expectedTotalAmount
      Parameters:
      feesTotal - The total fees related to the expectedTotalAmount
    • 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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object