Class Transaction
java.lang.Object
com.broadleafcommerce.creditaccount.domain.Transaction
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware
,Serializable
public class Transaction
extends Object
implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware
The transaction information for the credit account.
- Author:
- Dima Myroniuk (dmyroniuk)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
javax.money.MonetaryAmount
The amount related to this transaction.javax.money.MonetaryAmount
The unused/unexpired amount related to this transaction.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState
A subset ofTracking
information to expose the context state for this object.The credit account reference to the credit account.javax.money.CurrencyUnit
The currency gathered fromgetAmount()
The timestamp when this transaction response was recorded.The timestamp when this transaction will expire.getId()
The id of this transaction.The reason for this transaction.Description for the reason for this transaction.The child debit transactions for purchases or expirations.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 id of user who initiated the transaction.The type of user who initiated the transaction.The sub-type of this transaction.The transaction id known by the payment gateway.getType()
The type of this transaction.The version of this transaction.int
hashCode()
void
setAmount
(javax.money.MonetaryAmount amount) The amount related to this transaction.void
setAmountRemaining
(javax.money.MonetaryAmount amountRemaining) The unused/unexpired amount related to this transaction.void
setContextState
(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTracking
information to expose the context state for this object.void
setCreditAccountRef
(CreditAccountRef creditAccountRef) The credit account reference to the credit account.void
setCurrency
(javax.money.CurrencyUnit currencyUnit) void
setDateRecorded
(Instant dateRecorded) The timestamp when this transaction response was recorded.void
setExpirationDate
(Instant expirationDate) The timestamp when this transaction will expire.void
The id of this transaction.void
The reason for this transaction.void
setReasonDescription
(String reasonDescription) Description for the reason for this transaction.void
setRelatedTransactionDetails
(List<RelatedTransactionDetail> relatedTransactionDetails) The child debit transactions for purchases or expirations.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
setSourceUserId
(String sourceUserId) The id of user who initiated the transaction.void
setSourceUserType
(String sourceUserType) The type of user who initiated the transaction.void
setSubType
(String subType) The sub-type of this transaction.void
setTransactionReferenceId
(String transactionReferenceId) The transaction id known by the payment gateway.void
The type of this transaction.void
setVersion
(Integer version) The version of this transaction.toString()
-
Constructor Details
-
Transaction
public Transaction()
-
-
Method Details
-
getCurrency
@Nullable public javax.money.CurrencyUnit getCurrency()The currency gathered fromgetAmount()
- Returns:
- The currency gathered from the amount
-
setCurrency
public void setCurrency(javax.money.CurrencyUnit currencyUnit) -
getId
The id of this transaction.- Returns:
- The id of this transaction.
-
getCreditAccountRef
The credit account reference to the credit account.- Returns:
- The credit account reference to the credit account.
-
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
-
getRequestId
The id used to represent the request that produced this transaction.- Returns:
- The id used to represent the request that produced this transaction
-
getType
The type of this transaction.- Returns:
- The type of this transaction
- See Also:
-
getSubType
The sub-type of this transaction.- Returns:
- The sub-type of this transaction
- See Also:
-
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
-
getSourceUserType
The type of user who initiated the transaction.- Returns:
- The type of user who initiated the transaction
- See Also:
-
getSourceUserId
The id of user who initiated the transaction.- Returns:
- The id of user who 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
- See Also:
-
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:
-
getReason
The reason for this transaction.- Returns:
- The reason for this transaction
-
getReasonDescription
Description for the reason for this transaction.- Returns:
- Description for the reason for this transaction
-
getDateRecorded
The timestamp when this transaction response was recorded.- Returns:
- The timestamp when this transaction response was recorded
-
getExpirationDate
The timestamp when this transaction will expire. Note: this field is only applicable for credit transactions.- Returns:
- The timestamp when this transaction will expire
-
getAmount
public javax.money.MonetaryAmount getAmount()The amount related to this transaction.- Returns:
- The amount related to this transaction
-
getAmountRemaining
public javax.money.MonetaryAmount getAmountRemaining()The unused/unexpired amount related to this transaction. Note: this field is only applicable if this is an expiring credit transaction.- Returns:
- The unused/unexpired amount related to this transaction
-
getRelatedTransactionDetails
The child debit transactions for purchases or expirations. Note: These records should only be present on credit transactions.- Returns:
- the related transaction details
-
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()A subset ofTracking
information to expose the context state for this object.- Specified by:
getContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
- Returns:
- a subset of
Tracking
information to expose the context state for this object
-
getVersion
The version of this transaction. Used for checking that the requested version of the transaction is up-to-date before saving changes. Required for any request which results in an update being made. This should never be manually incremented/decremented. -
setId
The id of this transaction.- Parameters:
transactionId
- The id of this transaction.
-
setCreditAccountRef
The credit account reference to the credit account.- Parameters:
transactionId
- The credit account reference to the credit account.
-
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
-
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
-
setType
The type of this transaction.- Parameters:
type
- The type of this transaction- See Also:
-
setSubType
The sub-type of this transaction.- Parameters:
subType
- The sub-type of this transaction- See Also:
-
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
-
setSourceUserType
The type of user who initiated the transaction.- Parameters:
sourceUserType
- The type of user who initiated the transaction- See Also:
-
setSourceUserId
The id of user who initiated the transaction.- Parameters:
sourceUserId
- The id of user who 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- See Also:
-
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:
-
setReason
The reason for this transaction.- Parameters:
reason
- The reason for this transaction
-
setReasonDescription
Description for the reason for this transaction.- Parameters:
reasonDescription
- Description for the reason for this transaction
-
setDateRecorded
The timestamp when this transaction response was recorded.- Parameters:
dateRecorded
- The timestamp when this transaction response was recorded
-
setExpirationDate
The timestamp when this transaction will expire. Note: this field is only applicable for credit transactions.- Parameters:
expirationDate
- The timestamp when this transaction will expire
-
setAmount
public void setAmount(javax.money.MonetaryAmount amount) The amount related to this transaction.- Parameters:
amount
- The amount related to this transaction
-
setAmountRemaining
public void setAmountRemaining(javax.money.MonetaryAmount amountRemaining) The unused/unexpired amount related to this transaction. Note: this field is only applicable if this is an expiring credit transaction.- Parameters:
amountRemaining
- The unused/unexpired amount related to this transaction
-
setRelatedTransactionDetails
The child debit transactions for purchases or expirations. Note: These records should only be present on credit transactions.- Parameters:
relatedTransactionDetails
- the related transaction details
-
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTracking
information to expose the context state for this object.- Specified by:
setContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
- Parameters:
contextState
- a subset ofTracking
information to expose the context state for this object
-
setVersion
The version of this transaction. Used for checking that the requested version of the transaction is up-to-date before saving changes. Required for any request which results in an update being made. This should never be manually incremented/decremented. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-