Class PaymentSummary
- All Implemented Interfaces:
Serializable
- Author:
- Dima Myroniuk (dmyroniuk)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
getAddress
(String addressType) Gathers one of the payment's relatedaddresses
by typeThe collection of related addresses that may include billing or shipping addressesjavax.money.MonetaryAmount
javax.money.MonetaryAmount
javax.money.MonetaryAmount
The total authorized amount for capture.javax.money.MonetaryAmount
Determines the amount that can be authorized for this payment summaryjavax.money.MonetaryAmount
Determines the amount that can be authorized and captured for this payment summaryjavax.money.MonetaryAmount
Determines the amount that can be captured for this payment summaryjavax.money.MonetaryAmount
Determines the amount that can be refunded for this payment summaryjavax.money.MonetaryAmount
Determines the amount that can be reverse-authorized for this payment summaryjavax.money.MonetaryAmount
The total amount of Authorize or AuthorizeAndCapture transactions that require 3DS verification.javax.money.MonetaryAmount
The total amount awaiting result for transactions that require external interaction.javax.money.MonetaryAmount
The total amount that is currently captured.javax.money.MonetaryAmount
The total detached credit amount.javax.money.MonetaryAmount
The total refunded amount.javax.money.MonetaryAmount
The total amount sent to the payment gateway for authorize, and is waiting for a response about the transaction result.javax.money.MonetaryAmount
The total amount sent to the payment gateway for capture, and is waiting for a response about the transaction result.javax.money.CurrencyUnit
The currency gathered fromgetAmount()
javax.money.MonetaryAmount
javax.money.MonetaryAmount
javax.money.MonetaryAmount
getName()
com.broadleafcommerce.paymentgateway.domain.NextAction
The next step required by the payment gateway to continue processing this payment.The id of the entity that owns this payment.Describes the owner of the payment.javax.money.MonetaryAmount
The total amount sent to the payment gateway for refund, and is waiting for a response about the transaction result.javax.money.MonetaryAmount
The total amount sent to the payment gateway for reverse authorize, and is waiting for a response about the transaction result.javax.money.MonetaryAmount
javax.money.MonetaryAmount
javax.money.MonetaryAmount
The total amount ever captured, as opposed to the current snapshot of the captured amount represented ingetAmountCaptured()
.getType()
The version of this payment.int
hashCode()
boolean
Determines if the payment summary is fully authorizedboolean
Determines if the payment summary is fully capturedboolean
Indicates that the payment transaction has been flagged for manual review via fraud checks.boolean
Determines if the payment summary is partially capturedboolean
Whether a portion of an authorization transaction can be reversed, or if the full authorization transaction must be reversed.boolean
Declares if the reverse authorize for this functionality only allows reversing the full non-captured amountboolean
void
setAccessRestrictions
(List<String> accessRestrictions) void
setAddressByType
(Map<String, Address> addressByType) The collection of related addresses that may include billing or shipping addressesvoid
setAdjustmentsTotal
(javax.money.MonetaryAmount adjustmentsTotal) void
setAmount
(javax.money.MonetaryAmount amount) void
setAmountAuthorized
(javax.money.MonetaryAmount amountAuthorized) The total authorized amount for capture.void
setAmountAwaiting3DSResult
(javax.money.MonetaryAmount amountAwaiting3DSResult) The total amount of Authorize or AuthorizeAndCapture transactions that require 3DS verification.void
setAmountAwaitingExternalResult
(javax.money.MonetaryAmount amountAwaitingExternalResult) The total amount awaiting result for transactions that require external interaction.void
setAmountCaptured
(javax.money.MonetaryAmount amountCaptured) The total amount that is currently captured.void
setAmountCredited
(javax.money.MonetaryAmount amountCredited) The total detached credit amount.void
setAmountRefunded
(javax.money.MonetaryAmount amountRefunded) The total refunded amount.void
setAttributes
(Map<String, String> attributes) 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.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.void
setDisplayAttributes
(Map<String, String> displayAttributes) void
setFeesTotal
(javax.money.MonetaryAmount feesTotal) void
setFulfillmentTotal
(javax.money.MonetaryAmount fulfillmentTotal) void
setGatewayType
(String gatewayType) void
setHasTransactionFlaggedForManualReview
(boolean hasTransactionFlaggedForManualReview) Indicates that the payment transaction has been flagged for manual review via fraud checks.void
setIncludedTaxTotal
(javax.money.MonetaryAmount includedTaxTotal) void
void
setNextAction
(com.broadleafcommerce.paymentgateway.domain.NextAction nextAction) The next step required by the payment gateway to continue processing this payment.void
setOwnerId
(String ownerId) The id of the entity that owns this payment.void
setOwnerType
(String ownerType) Describes the owner of the payment.void
setPartialReverseAuthSupported
(boolean partialReverseAuthSupported) Whether a portion of an authorization transaction can be reversed, or if the full authorization transaction must be reversed.void
setPaymentId
(String paymentId) 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.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.void
setReverseAuthRemainder
(boolean reverseAuthRemainder) Declares if the reverse authorize for this functionality only allows reversing the full non-captured amountvoid
setSingleUsePaymentMethod
(boolean isSingleUsePaymentMethod) void
setSubtotal
(javax.money.MonetaryAmount subtotal) void
setTaxTotal
(javax.money.MonetaryAmount taxTotal) void
setTotalEverCaptured
(javax.money.MonetaryAmount totalEverCaptured) The total amount ever captured, as opposed to the current snapshot of the captured amount represented ingetAmountCaptured()
.void
void
setVersion
(Integer version) The version of this payment.toString()
-
Constructor Details
-
PaymentSummary
public PaymentSummary()
-
-
Method Details
-
getAmountAvailableForAuthorize
public javax.money.MonetaryAmount getAmountAvailableForAuthorize()Determines the amount that can be authorized for this payment summary- Returns:
- The amount that is available for authorize
-
getAmountAvailableForCapture
public javax.money.MonetaryAmount getAmountAvailableForCapture()Determines the amount that can be captured for this payment summary- Returns:
- The amount that is available for capture
-
getAmountAvailableForAuthorizeAndCapture
public javax.money.MonetaryAmount getAmountAvailableForAuthorizeAndCapture()Determines the amount that can be authorized and captured for this payment summary- Returns:
- The amount that is available for authorize and capture
-
getAmountAvailableForReverseAuthorization
public javax.money.MonetaryAmount getAmountAvailableForReverseAuthorization()Determines the amount that can be reverse-authorized for this payment summary- Returns:
- The amount that is available for reverse-authorized
-
getAmountAvailableForRefund
public javax.money.MonetaryAmount getAmountAvailableForRefund()Determines the amount that can be refunded for this payment summary- Returns:
- The amount that is available for refund
-
isFullyAuthorized
public boolean isFullyAuthorized()Determines if the payment summary is fully authorized- Returns:
- true if the payment summary has authorized the full amount, false otherwise
-
isFullyCaptured
public boolean isFullyCaptured()Determines if the payment summary is fully captured- Returns:
- true if the payment summary has captured the full amount, false otherwise
-
isPartiallyCaptured
public boolean isPartiallyCaptured()Determines if the payment summary is partially captured- Returns:
- true if the payment summary has started to capture an amount (smaller than the full amount), false otherwise
-
getAddress
Gathers one of the payment's relatedaddresses
by type- Returns:
- The payment's related address identified by type
-
getCurrency
@Nullable public javax.money.CurrencyUnit getCurrency()The currency gathered fromgetAmount()
- Returns:
- The currency gathered from the amount
-
getPaymentId
- See Also:
-
getName
- See Also:
-
getType
- See Also:
-
getGatewayType
- See Also:
-
getOwnerType
Describes the owner of the payment. For example, the payment could have originated with a cart or a subscription, therefore this value might be CART or SUBSCRIPTION.- Returns:
- The type describing the owner of the payment
-
getOwnerId
The id of the entity that owns this payment. For example, this may be a cart id, or a subscription billing cycle id.- Returns:
- The id of the entity that owns this payment.
-
getAddressByType
The collection of related addresses that may include billing or shipping addresses- Returns:
- The collection of related addresses
-
getAttributes
- See Also:
-
getDisplayAttributes
- See Also:
-
isSingleUsePaymentMethod
public boolean isSingleUsePaymentMethod()- See Also:
-
getAmount
public javax.money.MonetaryAmount getAmount()- See Also:
-
getSubtotal
public javax.money.MonetaryAmount getSubtotal()- See Also:
-
getAdjustmentsTotal
public javax.money.MonetaryAmount getAdjustmentsTotal()- See Also:
-
getFulfillmentTotal
public javax.money.MonetaryAmount getFulfillmentTotal()- See Also:
-
getFeesTotal
public javax.money.MonetaryAmount getFeesTotal()- See Also:
-
getTaxTotal
public javax.money.MonetaryAmount getTaxTotal()- See Also:
-
getIncludedTaxTotal
public javax.money.MonetaryAmount getIncludedTaxTotal()- See Also:
-
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 ingetAmountCaptured()
.- 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
-
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.
-
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
-
getVersion
The version of this payment. Used for checking that the requested version of the payment is up-to-date before saving changes. Required for any request which results in an update being made to the payment. This should never be manually incremented/decremented. -
isPartialReverseAuthSupported
public boolean isPartialReverseAuthSupported()Whether a portion of an authorization transaction can be reversed, or if the full authorization transaction must be reversed.- Returns:
- Whether a portion of an authorization transaction can be reversed.
-
isReverseAuthRemainder
public boolean isReverseAuthRemainder()Declares if the reverse authorize for this functionality only allows reversing the full non-captured amount- Returns:
- Declares if the reverse authorize for this functionality only allows reversing the full non-captured amount
-
isHasTransactionFlaggedForManualReview
public boolean isHasTransactionFlaggedForManualReview()Indicates that the payment transaction has been flagged for manual review via fraud checks.- Returns:
- true if the transaction flagged for manual review
-
getAccessRestrictions
- See Also:
-
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.
-
getNextAction
@Nullable public com.broadleafcommerce.paymentgateway.domain.NextAction getNextAction()The next step required by the payment gateway to continue processing this payment.- Returns:
- The next step required by the payment gateway to continue processing this payment.
-
setPaymentId
- See Also:
-
setName
- See Also:
-
setType
- See Also:
-
setGatewayType
- See Also:
-
setOwnerType
Describes the owner of the payment. For example, the payment could have originated with a cart or a subscription, therefore this value might be CART or SUBSCRIPTION.- Parameters:
ownerType
- The type describing the owner of the payment
-
setOwnerId
The id of the entity that owns this payment. For example, this may be a cart id, or a subscription billing cycle id.- Parameters:
ownerId
- The id of the entity that owns this payment.
-
setAddressByType
The collection of related addresses that may include billing or shipping addresses- Parameters:
addressByType
- The collection of related addresses
-
setAttributes
- See Also:
-
setDisplayAttributes
- See Also:
-
setSingleUsePaymentMethod
public void setSingleUsePaymentMethod(boolean isSingleUsePaymentMethod) - See Also:
-
setAmount
public void setAmount(javax.money.MonetaryAmount amount) - See Also:
-
setSubtotal
public void setSubtotal(javax.money.MonetaryAmount subtotal) - See Also:
-
setAdjustmentsTotal
public void setAdjustmentsTotal(javax.money.MonetaryAmount adjustmentsTotal) - See Also:
-
setFulfillmentTotal
public void setFulfillmentTotal(javax.money.MonetaryAmount fulfillmentTotal) - See Also:
-
setFeesTotal
public void setFeesTotal(javax.money.MonetaryAmount feesTotal) - See Also:
-
setTaxTotal
public void setTaxTotal(javax.money.MonetaryAmount taxTotal) - See Also:
-
setIncludedTaxTotal
public void setIncludedTaxTotal(javax.money.MonetaryAmount includedTaxTotal) - See Also:
-
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 ingetAmountCaptured()
.- 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
-
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.
-
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
-
setVersion
The version of this payment. Used for checking that the requested version of the payment is up-to-date before saving changes. Required for any request which results in an update being made to the payment. This should never be manually incremented/decremented. -
setPartialReverseAuthSupported
public void setPartialReverseAuthSupported(boolean partialReverseAuthSupported) Whether a portion of an authorization transaction can be reversed, or if the full authorization transaction must be reversed.- Parameters:
partialReverseAuthSupported
- Whether a portion of an authorization transaction can be reversed.
-
setReverseAuthRemainder
public void setReverseAuthRemainder(boolean reverseAuthRemainder) Declares if the reverse authorize for this functionality only allows reversing the full non-captured amount- Parameters:
reverseAuthRemainder
- Declares if the reverse authorize for this functionality only allows reversing the full non-captured amount
-
setHasTransactionFlaggedForManualReview
public void setHasTransactionFlaggedForManualReview(boolean hasTransactionFlaggedForManualReview) Indicates that the payment transaction has been flagged for manual review via fraud checks.- Parameters:
hasTransactionFlaggedForManualReview
- whether the transaction is marked for manual review
-
setAccessRestrictions
- See Also:
-
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.
-
setNextAction
public void setNextAction(@Nullable com.broadleafcommerce.paymentgateway.domain.NextAction nextAction) The next step required by the payment gateway to continue processing this payment.- Parameters:
nextAction
- The next step required by the payment gateway to continue processing this payment.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-