Class TransactionSummary

java.lang.Object
com.broadleafcommerce.paymenttransaction.domain.TransactionSummary
All Implemented Interfaces:
Serializable

public class TransactionSummary extends Object implements Serializable
The domain that summarizes the current state of transactions against a set of payments identified by a common owning entity (e.g. a cart).
Author:
Dima Myroniuk (dmyroniuk)
See Also:
  • Constructor Details

    • TransactionSummary

      public TransactionSummary()
  • Method Details

    • getCurrency

      @Nullable public javax.money.CurrencyUnit getCurrency()
      The currency gathered from the summary's transactions
      Returns:
      The currency gathered from the summary's transactions
    • getTransactions

      public List<PaymentTransactionRef> getTransactions()
      The list of transactions that are represented in this transaction summary.
      Returns:
      The list of transactions that are represented in this transaction summary.
    • getPaymentSummaries

      public List<PaymentSummary> getPaymentSummaries()
      A collection of PaymentSummaries related to the same owning entity.
      Returns:
      A collection of PaymentSummaries related to the same owning entity.
    • getAmountAuthorized

      public javax.money.MonetaryAmount getAmountAuthorized()
      The total authorized amount for capture. This value is calculated as "total authorized - total reverse-authed".
      Returns:
      the total authorized amount for capture
    • getAmountCaptured

      public javax.money.MonetaryAmount getAmountCaptured()
      The total amount that is currently captured. This value is calculated as "total captured - total refunded".
      Returns:
      The total amount that is currently captured
    • getTotalEverCaptured

      public javax.money.MonetaryAmount getTotalEverCaptured()
      The total amount ever captured, as opposed to the current snapshot of the captured amount represented in getAmountCaptured().
      Returns:
      The total amount ever captured
    • getAmountRefunded

      public javax.money.MonetaryAmount getAmountRefunded()
      The total refunded amount.
      Returns:
      the total refunded amount
    • getAmountCredited

      public javax.money.MonetaryAmount getAmountCredited()
      The total detached credit amount.
      Returns:
      the total detached credit amount
    • getAuthorizeAmountAwaitingResult

      public javax.money.MonetaryAmount getAuthorizeAmountAwaitingResult()
      The total amount sent to the payment gateway for authorize, and is waiting for a response about the transaction result.

      Typically authorize transactions have immediate result, but sometimes the result can be pending for certain gateways.

      Returns:
      the total amount sent to the payment gateway for authorize and is waiting for a response about the transaction result
    • getCaptureAmountAwaitingResult

      public javax.money.MonetaryAmount getCaptureAmountAwaitingResult()
      The total amount sent to the payment gateway for capture, and is waiting for a response about the transaction result.

      This value should only be present for payment gateways that support asynchronous transaction executions.

      Returns:
      the total amount sent to the payment gateway for capture and is waiting for a response about the transaction result
    • getReverseAuthorizeAmountAwaitingResult

      public javax.money.MonetaryAmount getReverseAuthorizeAmountAwaitingResult()
      The total amount sent to the payment gateway for reverse authorize, and is waiting for a response about the transaction result.

      This value should only be present for payment gateways that support asynchronous transaction executions.

      Returns:
      the total amount sent to the payment gateway for reverse authorize and is waiting for a response about the transaction result
    • getRefundAmountAwaitingResult

      public javax.money.MonetaryAmount getRefundAmountAwaitingResult()
      The total amount sent to the payment gateway for refund, and is waiting for a response about the transaction result.

      This value should only be present for payment gateways that support asynchronous transaction executions.

      Returns:
      the total amount sent to the payment gateway for refund and is waiting for a response about the transaction result
    • getAmountAwaiting3DSResult

      public javax.money.MonetaryAmount getAmountAwaiting3DSResult()
      The total amount of Authorize or AuthorizeAndCapture transactions that require 3DS verification. Note: this excludes transactions that previously required 3DS verification, but we now have transaction results for.

      This value should only be present for payment gateways that support 3DS verification.

      Returns:
      The total amount of Authorize or AuthorizeAndCapture transactions that require 3DS verification.
    • getAmountAwaitingExternalResult

      public javax.money.MonetaryAmount getAmountAwaitingExternalResult()
      The total amount awaiting result for transactions that require external interaction.

      This value should only be present for payment gateways that support external interaction.

      Returns:
      The total amount awaiting result for transactions that require external interaction.
    • getAdditionalAttributes

      public Map<String,Object> getAdditionalAttributes()
      Map holding any additional attributes used to describe the transaction summary.
    • setTransactions

      public void setTransactions(List<PaymentTransactionRef> transactions)
      The list of transactions that are represented in this transaction summary.
      Parameters:
      transactions - The list of transactions that are represented in this transaction summary.
    • setPaymentSummaries

      public void setPaymentSummaries(List<PaymentSummary> paymentSummaries)
      A collection of PaymentSummaries related to the same owning entity.
      Parameters:
      paymentSummaries - A collection of PaymentSummaries related to same owning entity.
    • setAmountAuthorized

      public void setAmountAuthorized(javax.money.MonetaryAmount amountAuthorized)
      The total authorized amount for capture. This value is calculated as "total authorized - total reverse-authed".
      Parameters:
      amountAuthorized - the total authorized amount for capture
    • setAmountCaptured

      public void setAmountCaptured(javax.money.MonetaryAmount amountCaptured)
      The total amount that is currently captured. This value is calculated as "total captured - total refunded".
      Parameters:
      amountCaptured - The total amount that is currently captured
    • setTotalEverCaptured

      public void setTotalEverCaptured(javax.money.MonetaryAmount totalEverCaptured)
      The total amount ever captured, as opposed to the current snapshot of the captured amount represented in getAmountCaptured().
      Parameters:
      totalEverCaptured - The total amount ever captured
    • setAmountRefunded

      public void setAmountRefunded(javax.money.MonetaryAmount amountRefunded)
      The total refunded amount.
      Parameters:
      amountRefunded - the total refunded amount
    • setAmountCredited

      public void setAmountCredited(javax.money.MonetaryAmount amountCredited)
      The total detached credit amount.
      Parameters:
      amountCredited - the total detached credit amount
    • setAuthorizeAmountAwaitingResult

      public void setAuthorizeAmountAwaitingResult(javax.money.MonetaryAmount authorizeAmountAwaitingResult)
      The total amount sent to the payment gateway for authorize, and is waiting for a response about the transaction result.

      Typically authorize transactions have immediate result, but sometimes the result can be pending for certain gateways.

      Parameters:
      authorizeAmountAwaitingResult - the total amount sent to the payment gateway for authorize and is waiting for a response about the transaction result
    • setCaptureAmountAwaitingResult

      public void setCaptureAmountAwaitingResult(javax.money.MonetaryAmount captureAmountAwaitingResult)
      The total amount sent to the payment gateway for capture, and is waiting for a response about the transaction result.

      This value should only be present for payment gateways that support asynchronous transaction executions.

      Parameters:
      captureAmountAwaitingResult - the total amount sent to the payment gateway for capture and is waiting for a response about the transaction result
    • setReverseAuthorizeAmountAwaitingResult

      public void setReverseAuthorizeAmountAwaitingResult(javax.money.MonetaryAmount reverseAuthorizeAmountAwaitingResult)
      The total amount sent to the payment gateway for reverse authorize, and is waiting for a response about the transaction result.

      This value should only be present for payment gateways that support asynchronous transaction executions.

      Parameters:
      reverseAuthorizeAmountAwaitingResult - the total amount sent to the payment gateway for reverse authorize and is waiting for a response about the transaction result
    • setRefundAmountAwaitingResult

      public void setRefundAmountAwaitingResult(javax.money.MonetaryAmount refundAmountAwaitingResult)
      The total amount sent to the payment gateway for refund, and is waiting for a response about the transaction result.

      This value should only be present for payment gateways that support asynchronous transaction executions.

      Parameters:
      refundAmountAwaitingResult - the total amount sent to the payment gateway for refund and is waiting for a response about the transaction result
    • setAmountAwaiting3DSResult

      public void setAmountAwaiting3DSResult(javax.money.MonetaryAmount amountAwaiting3DSResult)
      The total amount of Authorize or AuthorizeAndCapture transactions that require 3DS verification. Note: this excludes transactions that previously required 3DS verification, but we now have transaction results for.

      This value should only be present for payment gateways that support 3DS verification.

      Parameters:
      amountAwaiting3DSResult - The total amount of Authorize or AuthorizeAndCapture transactions that require 3DS verification.
    • setAmountAwaitingExternalResult

      public void setAmountAwaitingExternalResult(javax.money.MonetaryAmount amountAwaitingExternalResult)
      The total amount awaiting result for transactions that require external interaction.

      This value should only be present for payment gateways that support external interaction.

      Parameters:
      amountAwaitingExternalResult - The total amount awaiting result for transactions that require external interaction.
    • setAdditionalAttributes

      public void setAdditionalAttributes(Map<String,Object> additionalAttributes)
      Map holding any additional attributes used to describe the transaction summary.
    • 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