Class PaymentTransactionRef
- All Implemented Interfaces:
Serializable
- Author:
- Chris Kittrell (ckittrell)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
javax.money.MonetaryAmount
The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.javax.money.MonetaryAmount
The amount related to this transaction.javax.money.CurrencyUnit
The currency gathered fromgetAmount()
The timestamp when this transaction response was recordedThe type of transaction failurejavax.money.MonetaryAmount
The total fees related to theamount
Note: Only theamount
is required, but if this value is included, then thesubtotal
,fulfillmentTotal
,adjustmentsTotal
,taxTotal
, &includedTaxTotal
should be included also.javax.money.MonetaryAmount
The payment's total fulfillment cost.The response code provided by the payment gateway which may represent a success or failureThe gateway-specific id for the transaction.getId()
The payment transaction's id.javax.money.MonetaryAmount
The amount of taxes that are included in the subtotal (VAT).The state of this transaction - e.g.Describes the reason for themanagementState
.Describes the outcome of the manual review of a transaction after it was flagged by fraud checks.Describes the reason for approving/rejecting a transaction during a manual fraud review.The id of the parent source entity of the transaction that proceeded this transaction.The type of the parent source entity of the transaction that proceeded this transaction.The payment's id.The id used to represent the request that produced this transaction.The name of the system that initiated the transaction - e.g.The ID of the source entity associated with the transaction.The type of the source entity associated with the transaction.The status of the transactionjavax.money.MonetaryAmount
The payment's total usually excluding adjustments, tax, fees, and shipping.javax.money.MonetaryAmount
The payment's total tax cost.The transaction id known by the payment gateway.getType()
The type of this transaction (authorize, capture, refund, etc.)int
hashCode()
boolean
Indicates that the payment transaction has been flagged for manual review via fraud checks.void
setAdjustmentsTotal
(javax.money.MonetaryAmount adjustmentsTotal) The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.void
setAmount
(javax.money.MonetaryAmount amount) The amount related to this transaction.void
setDateRecorded
(Instant dateRecorded) The timestamp when this transaction response was recordedvoid
setFailureType
(String failureType) The type of transaction failurevoid
setFeesTotal
(javax.money.MonetaryAmount feesTotal) The total fees related to theamount
Note: Only theamount
is required, but if this value is included, then thesubtotal
,fulfillmentTotal
,adjustmentsTotal
,taxTotal
, &includedTaxTotal
should be included also.void
setFlaggedForManualReview
(boolean flaggedForManualReview) Indicates that the payment transaction has been flagged for manual review via fraud checks.void
setFulfillmentTotal
(javax.money.MonetaryAmount fulfillmentTotal) The payment's total fulfillment cost.void
setGatewayResponseCode
(String gatewayResponseCode) The response code provided by the payment gateway which may represent a success or failurevoid
setGatewayTransactionId
(String gatewayTransactionId) The gateway-specific id for the transaction.void
The payment transaction's id.void
setIncludedTaxTotal
(javax.money.MonetaryAmount includedTaxTotal) The amount of taxes that are included in the subtotal (VAT).void
setManagementState
(String managementState) The state of this transaction - e.g.void
setManagementStateReason
(String managementStateReason) Describes the reason for themanagementState
.void
setManualReviewResult
(String manualReviewResult) Describes the outcome of the manual review of a transaction after it was flagged by fraud checks.void
setManualReviewResultReason
(String manualReviewResultReason) Describes the reason for approving/rejecting a transaction during a manual fraud review.void
setParentSourceEntityId
(String parentSourceEntityId) The id of the parent source entity of the transaction that proceeded this transaction.void
setParentSourceEntityType
(String parentSourceEntityType) The type of the parent source entity of the transaction that proceeded this transaction.void
setPaymentId
(String paymentId) The payment's id.void
setRequestId
(String requestId) The id used to represent the request that produced this transaction.void
The name of the system that initiated the transaction - e.g.void
setSourceEntityId
(String sourceEntityId) The ID of the source entity associated with the transaction.void
setSourceEntityType
(String sourceEntityType) The type of the source entity associated with the transaction.void
The status of the transactionvoid
setSubtotal
(javax.money.MonetaryAmount subtotal) The payment's total usually excluding adjustments, tax, fees, and shipping.void
setTaxTotal
(javax.money.MonetaryAmount taxTotal) The payment's total tax cost.void
setTransactionReferenceId
(String transactionReferenceId) The transaction id known by the payment gateway.void
The type of this transaction (authorize, capture, refund, etc.)toString()
boolean
Whether this transaction was successful based ongetStatus()
.
-
Constructor Details
-
PaymentTransactionRef
public PaymentTransactionRef()
-
-
Method Details
-
wasSuccessful
public boolean wasSuccessful()Whether this transaction was successful based ongetStatus()
.- Returns:
- Whether this transaction was successful.
- See Also:
-
getCurrency
@Nullable public javax.money.CurrencyUnit getCurrency()The currency gathered fromgetAmount()
- Returns:
- The currency gathered from the amount
-
getId
The payment transaction's id.- Returns:
- The payment transaction's id.
-
getPaymentId
The payment's id.- Returns:
- The payment's id.
-
getRequestId
The id used to represent the request that produced this transaction.- Returns:
- The id used to represent the request that produced this transaction
-
getTransactionReferenceId
The transaction id known by the payment gateway. This reference can be used to link the request to the gateway's record of the transaction in the case that the calling application does not receive a response from the gateway.- Returns:
- The transaction id known by the payment gateway
-
getGatewayTransactionId
The gateway-specific id for the transaction.- Returns:
- The gateway-specific id for the transaction
-
getType
The type of this transaction (authorize, capture, refund, etc.)- Returns:
- The type of this transaction (authorize, capture, refund, etc.)
-
getStatus
The status of the transaction- Returns:
- The status of the transaction
- See Also:
-
getGatewayResponseCode
The response code provided by the payment gateway which may represent a success or failure- Returns:
- The response code provided by the payment gateway which may represent a success or failure
-
getFailureType
The type of transaction failure- Returns:
- The type of transaction failure
-
getAmount
public javax.money.MonetaryAmount getAmount()The amount related to this transaction. Depending on thetype
, this may be the amount authorized, captured, refunded, etc.- Returns:
- The amount related to this transaction
-
getSubtotal
public javax.money.MonetaryAmount getSubtotal()The payment's total usually excluding adjustments, tax, fees, and shipping. Note: Only theamount
is required, but if this value is included, then thefulfillmentTotal
,feesTotal
,adjustmentsTotal
,taxTotal
, &includedTaxTotal
should be included also.- 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. Note: Only theamount
is required, but if this value is included, then thesubtotal
,fulfillmentTotal
,feesTotal
,taxTotal
, &includedTaxTotal
should be included also.- 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. Note: Only theamount
is required, but if this value is included, then thesubtotal
,feesTotal
,adjustmentsTotal
,taxTotal
, &includedTaxTotal
should be included also.- Returns:
- The payment's total fulfillment cost.
-
getFeesTotal
public javax.money.MonetaryAmount getFeesTotal()The total fees related to theamount
Note: Only theamount
is required, but if this value is included, then thesubtotal
,fulfillmentTotal
,adjustmentsTotal
,taxTotal
, &includedTaxTotal
should be included also.- Returns:
- The total fees related to the
amount
-
getTaxTotal
public javax.money.MonetaryAmount getTaxTotal()The payment's total tax cost. Note: Only theamount
is required, but if this value is included, then thesubtotal
,fulfillmentTotal
,feesTotal
,adjustmentsTotal
, &includedTaxTotal
should be included also.- Returns:
- The payment's total tax cost.
-
getIncludedTaxTotal
public javax.money.MonetaryAmount getIncludedTaxTotal()The amount of taxes that are included in the subtotal (VAT). Note: Only theamount
is required, but if this value is included, then thesubtotal
,fulfillmentTotal
,feesTotal
,adjustmentsTotal
, &taxTotal
should be included also.- Returns:
- The amount of taxes that are included in the subtotal (VAT).
-
getSource
The name of the system that initiated the transaction - e.g. CART_OPERATION_SERVICES vs ORDER_OPERATION_SERVICES.- Returns:
- The name of the system that initiated the transaction
-
getSourceEntityType
The type of the source entity associated with the transaction. For example, "CHECKOUT_REQUEST" or "ORDER_FULFILLMENT".- Returns:
- The type of the source entity associated with the transaction
-
getSourceEntityId
The ID of the source entity associated with the transaction.For example, if
getSourceEntityType()
isORDER_FULFILLMENT
, this would be the ID of theOrderFulfillment
.- Returns:
- The ID of the source entity associated with the transaction
- See Also:
-
getParentSourceEntityType
The type of the parent source entity of the transaction that proceeded this transaction.This is used to identify the parent transaction instead of using the parent transaction id itself, because other systems have no knowledge of specific transactions.
For example, the execution of a refund transaction requires a proceeding capture or authorize and capture transaction. Let's say the proceeding capture transaction has the source entity type of
ORDER_FULFILLMENT
, and the refund transaction has the entity source type ofRETURN_CONFIRMATION
. In this case, the refund transaction request needs the parent source entity type ofORDER_FULFILLMENT
and its id in order to identify the parent capture transaction.- Returns:
- The type of the parent source entity of the transaction that proceeded this transaction
-
getParentSourceEntityId
The id of the parent source entity of the transaction that proceeded this transaction.- Returns:
- The id of the parent source entity of the transaction that proceeded this transaction
- See Also:
-
getManagementState
The state of this transaction - e.g. whether the transaction is scheduled for reversal or if it's being used in an active checkout. If the transaction was not successful, then we expect this value to be null.- Returns:
- The state of this transaction
-
getManagementStateReason
Describes the reason for themanagementState
.- Returns:
- The reason for the managementState value
-
isFlaggedForManualReview
public boolean isFlaggedForManualReview()Indicates that the payment transaction has been flagged for manual review via fraud checks.- Returns:
- true if the transaction flagged for manual review
-
getManualReviewResult
Describes the outcome of the manual review of a transaction after it was flagged by fraud checks.- Returns:
- The outcome of the manual review of a transaction after it was flagged by fraud checks.
-
getManualReviewResultReason
Describes the reason for approving/rejecting a transaction during a manual fraud review.- Returns:
- The reason for approving/rejecting a transaction during a manual fraud review.
-
getDateRecorded
The timestamp when this transaction response was recorded- Returns:
- The timestamp when this transaction response was recorded
-
setId
The payment transaction's id.- Parameters:
id
- The payment transaction's id.
-
setPaymentId
The payment's id.- Parameters:
paymentId
- The payment's id.
-
setRequestId
The id used to represent the request that produced this transaction.- Parameters:
requestId
- The id used to represent the request that produced this transaction
-
setTransactionReferenceId
The transaction id known by the payment gateway. This reference can be used to link the request to the gateway's record of the transaction in the case that the calling application does not receive a response from the gateway.- Parameters:
transactionReferenceId
- The transaction id known by the payment gateway
-
setGatewayTransactionId
The gateway-specific id for the transaction.- Parameters:
gatewayTransactionId
- The gateway-specific id for the transaction
-
setType
The type of this transaction (authorize, capture, refund, etc.)- Parameters:
type
- The type of this transaction
-
setStatus
The status of the transaction- Parameters:
status
- The status of the transaction- See Also:
-
setGatewayResponseCode
The response code provided by the payment gateway which may represent a success or failure- Parameters:
gatewayResponseCode
- The response code provided by the payment gateway which may represent a success or failure
-
setFailureType
The type of transaction failure- Parameters:
failureType
- The type of transaction failure
-
setAmount
public void setAmount(javax.money.MonetaryAmount amount) The amount related to this transaction. Depending on thetype
, this may be the amount authorized, captured, refunded, etc.- Parameters:
amount
- The amount related to this transaction
-
setSubtotal
public void setSubtotal(javax.money.MonetaryAmount subtotal) The payment's total usually excluding adjustments, tax, fees, and shipping. Note: Only theamount
is required, but if this value is included, then thefulfillmentTotal
,feesTotal
,adjustmentsTotal
,taxTotal
, &includedTaxTotal
should be included also.- 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. Note: Only theamount
is required, but if this value is included, then thesubtotal
,fulfillmentTotal
,feesTotal
,taxTotal
, &includedTaxTotal
should be included also.- 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. Note: Only theamount
is required, but if this value is included, then thesubtotal
,feesTotal
,adjustmentsTotal
,taxTotal
, &includedTaxTotal
should be included also.- Parameters:
fulfillmentTotal
- The payment's total fulfillment cost.
-
setFeesTotal
public void setFeesTotal(javax.money.MonetaryAmount feesTotal) The total fees related to theamount
Note: Only theamount
is required, but if this value is included, then thesubtotal
,fulfillmentTotal
,adjustmentsTotal
,taxTotal
, &includedTaxTotal
should be included also.- Parameters:
feesTotal
- The total fees related to theamount
-
setTaxTotal
public void setTaxTotal(javax.money.MonetaryAmount taxTotal) The payment's total tax cost. Note: Only theamount
is required, but if this value is included, then thesubtotal
,fulfillmentTotal
,feesTotal
,adjustmentsTotal
, &includedTaxTotal
should be included also.- 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). Note: Only theamount
is required, but if this value is included, then thesubtotal
,fulfillmentTotal
,feesTotal
,adjustmentsTotal
, &taxTotal
should be included also.- Parameters:
includedTaxTotal
- The amount of taxes that are included in the subtotal (VAT).
-
setSource
The name of the system that initiated the transaction - e.g. CART_OPERATION_SERVICES vs ORDER_OPERATION_SERVICES.- Parameters:
source
- The name of the system that initiated the transaction
-
setSourceEntityType
The type of the source entity associated with the transaction. For example, "CHECKOUT_REQUEST" or "ORDER_FULFILLMENT".- Parameters:
sourceEntityType
- The type of the source entity associated with the transaction
-
setSourceEntityId
The ID of the source entity associated with the transaction.For example, if
getSourceEntityType()
isORDER_FULFILLMENT
, this would be the ID of theOrderFulfillment
.- Parameters:
sourceEntityId
- The ID of the source entity associated with the transaction- See Also:
-
setParentSourceEntityType
The type of the parent source entity of the transaction that proceeded this transaction.This is used to identify the parent transaction instead of using the parent transaction id itself, because other systems have no knowledge of specific transactions.
For example, the execution of a refund transaction requires a proceeding capture or authorize and capture transaction. Let's say the proceeding capture transaction has the source entity type of
ORDER_FULFILLMENT
, and the refund transaction has the entity source type ofRETURN_CONFIRMATION
. In this case, the refund transaction request needs the parent source entity type ofORDER_FULFILLMENT
and its id in order to identify the parent capture transaction.- Parameters:
parentSourceEntityType
- The type of the parent source entity of the transaction that proceeded this transaction
-
setParentSourceEntityId
The id of the parent source entity of the transaction that proceeded this transaction.- Parameters:
parentSourceEntityId
- The id of the parent source entity of the transaction that proceeded this transaction- See Also:
-
setManagementState
The state of this transaction - e.g. whether the transaction is scheduled for reversal or if it's being used in an active checkout. If the transaction was not successful, then we expect this value to be null.- Parameters:
managementState
- The state of this transaction
-
setManagementStateReason
Describes the reason for themanagementState
.- Parameters:
managementStateReason
- The reason for the managementState value
-
setFlaggedForManualReview
public void setFlaggedForManualReview(boolean flaggedForManualReview) Indicates that the payment transaction has been flagged for manual review via fraud checks.- Parameters:
flaggedForManualReview
- whether the transaction is marked for manual review
-
setManualReviewResult
Describes the outcome of the manual review of a transaction after it was flagged by fraud checks.- Parameters:
manualReviewResult
- The outcome of the manual review of a transaction after it was flagged by fraud checks.
-
setManualReviewResultReason
Describes the reason for approving/rejecting a transaction during a manual fraud review.- Parameters:
manualReviewResultReason
- The reason for approving/rejecting a transaction during a manual fraud review.
-
setDateRecorded
The timestamp when this transaction response was recorded- Parameters:
dateRecorded
- The timestamp when this transaction response was recorded
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-