Class TransactionExecutionRequest
- java.lang.Object
-
- com.broadleafcommerce.cartoperation.service.provider.external.domain.payment.TransactionExecutionRequest
-
- All Implemented Interfaces:
Serializable
public class TransactionExecutionRequest extends Object implements Serializable
The request payload used to execute a transaction against aPaymentSummary.- Author:
- Chris Kittrell (ckittrell)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TransactionExecutionRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)javax.money.MonetaryAmountgetAdjustmentsTotal()The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.javax.money.CurrencyUnitgetCurrency()The currency gathered from thegetTransactionAmount()javax.money.MonetaryAmountgetFulfillmentTotal()The payment's total fulfillment cost.StringgetParentTransactionId()The id of the payment transaction that proceeded this transaction.StringgetPaymentId()The id of the relatedPaymentSummarythat is meant to be used for the transaction.StringgetRequestId()The id representing the customer's request to execute one or more transactions.StringgetSecurityCode()The payment method security code that may be required to execute the transaction.StringgetSource()A simple description of the system that initiated this transaction execution request.StringgetSourceEntityId()The ID of the source entity associated with the transaction.StringgetSourceEntityType()The type of the source entity associated with the transaction.javax.money.MonetaryAmountgetSubtotal()The payment's total usually excluding adjustments, tax, and shipping.javax.money.MonetaryAmountgetTaxTotal()The payment's total tax cost.javax.money.MonetaryAmountgetTransactionAmount()The transaction amount that we're expecting to execute against thePaymentSummary.StringgetTransactionType()The type of transaction that is to be executed.inthashCode()booleanhasParentTransactionId()booleanisAllowAutomaticReversal()Whether to allow this transaction to be automatically reversed by payment system's scheduled jobs.voidsetAdjustmentsTotal(javax.money.MonetaryAmount adjustmentsTotal)The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.voidsetAllowAutomaticReversal(boolean allowAutomaticReversal)Whether to allow this transaction to be automatically reversed by payment system's scheduled jobs.voidsetFulfillmentTotal(javax.money.MonetaryAmount fulfillmentTotal)The payment's total fulfillment cost.voidsetParentTransactionId(String parentTransactionId)The id of the payment transaction that proceeded this transaction.voidsetPaymentId(String paymentId)The id of the relatedPaymentSummarythat is meant to be used for the transaction.voidsetRequestId(String requestId)The id representing the customer's request to execute one or more transactions.voidsetSecurityCode(String securityCode)The payment method security code that may be required to execute the transaction.voidsetSource(String source)A simple description of the system that initiated this transaction execution request.voidsetSourceEntityId(String sourceEntityId)The ID of the source entity associated with the transaction.voidsetSourceEntityType(String sourceEntityType)The type of the source entity associated with the transaction.voidsetSubtotal(javax.money.MonetaryAmount subtotal)The payment's total usually excluding adjustments, tax, and shipping.voidsetTaxTotal(javax.money.MonetaryAmount taxTotal)The payment's total tax cost.voidsetTransactionAmount(javax.money.MonetaryAmount transactionAmount)The transaction amount that we're expecting to execute against thePaymentSummary.voidsetTransactionType(String transactionType)The type of transaction that is to be executed.StringtoString()
-
-
-
Method Detail
-
getCurrency
@Nullable public javax.money.CurrencyUnit getCurrency()
The currency gathered from thegetTransactionAmount()- Returns:
- The currency gathered from the request's transaction amount
-
hasParentTransactionId
public boolean hasParentTransactionId()
-
getPaymentId
public String getPaymentId()
The id of the relatedPaymentSummarythat is meant to be used for the transaction.- Returns:
- The id of the related
PaymentSummarythat is meant to be used for the transaction.
-
getParentTransactionId
public String getParentTransactionId()
The id of the payment transaction that proceeded this transaction. Typically this is used when the execution of a transaction requires knowledge of the proceeding transaction, like the need to reference anDefaultTransactionTypes.AUTHORIZEtransaction to execute aDefaultTransactionTypes.CAPTUREtransaction.- Returns:
- The id of the payment transaction that proceeded this transaction.
-
getSource
public String getSource()
A simple description of the system that initiated this transaction execution request.- Returns:
- A simple description of the system that initiated this transaction execution request.
-
getSourceEntityType
public String getSourceEntityType()
The type of the source entity associated with the transaction. For example, "CHECKOUT_REQUEST".
-
getSourceEntityId
public String getSourceEntityId()
The ID of the source entity associated with the transaction.For example, if
getSourceEntityType()isCHECKOUT_REQUEST, this would be the ID of the checkout request.- See Also:
getSourceEntityType()
-
getTransactionType
public String getTransactionType()
The type of transaction that is to be executed.- Returns:
- The type of transaction that is to be executed.
- See Also:
TransactionType
-
isAllowAutomaticReversal
public boolean isAllowAutomaticReversal()
Whether to allow this transaction to be automatically reversed by payment system's scheduled jobs.Set this field to
falseif this transaction should only be allowed to be reversed by Order Operation Service.- Returns:
- Whether to allow this transaction to be automatically reversed by payment system's scheduled jobs.
-
getTransactionAmount
public javax.money.MonetaryAmount getTransactionAmount()
The transaction amount that we're expecting to execute against thePaymentSummary. This amount must be valid according to what's available for thePaymentSummary. If specified, the amount details (subtotal,adjustmentsTotal,fulfillmentTotal, &taxTotal) should sum together to equal this amount.- Returns:
- The transaction amount that we're expecting to execute against the
PaymentSummary.
-
getSubtotal
public javax.money.MonetaryAmount getSubtotal()
The payment's total usually excluding adjustments, tax, and shipping.- Returns:
- The payment's total usually excluding adjustments, tax, 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.
-
getTaxTotal
public javax.money.MonetaryAmount getTaxTotal()
The payment's total tax cost.- Returns:
- The payment's total tax cost.
-
getSecurityCode
public String getSecurityCode()
The payment method security code that may be required to execute the transaction. Typically, this value is required to execute transactions against multi-use payment methods to validate that the user is the owner of the payment method.- Returns:
- The payment method security code that may be required to execute the transaction.
-
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.
-
setPaymentId
public void setPaymentId(String paymentId)
The id of the relatedPaymentSummarythat is meant to be used for the transaction.- Parameters:
paymentId- The id of the relatedPaymentSummarythat is meant to be used for the transaction.
-
setParentTransactionId
public void setParentTransactionId(String parentTransactionId)
The id of the payment transaction that proceeded this transaction. Typically this is used when the execution of a transaction requires knowledge of the proceeding transaction, like the need to reference anDefaultTransactionTypes.AUTHORIZEtransaction to execute aDefaultTransactionTypes.CAPTUREtransaction.- Parameters:
parentTransactionId- The id of the payment transaction that proceeded this transaction.
-
setSource
public void setSource(String source)
A simple description of the system that initiated this transaction execution request.- Parameters:
source- A simple description of the system that initiated this transaction execution request.
-
setSourceEntityType
public void setSourceEntityType(String sourceEntityType)
The type of the source entity associated with the transaction. For example, "CHECKOUT_REQUEST".
-
setSourceEntityId
public void setSourceEntityId(String sourceEntityId)
The ID of the source entity associated with the transaction.For example, if
getSourceEntityType()isCHECKOUT_REQUEST, this would be the ID of the checkout request.- See Also:
getSourceEntityType()
-
setTransactionType
public void setTransactionType(String transactionType)
The type of transaction that is to be executed.- Parameters:
transactionType- The type of transaction that is to be executed.- See Also:
TransactionType
-
setAllowAutomaticReversal
public void setAllowAutomaticReversal(boolean allowAutomaticReversal)
Whether to allow this transaction to be automatically reversed by payment system's scheduled jobs.Set this field to
falseif this transaction should only be allowed to be reversed by Order Operation Service.- Parameters:
allowAutomaticReversal- Whether to allow this transaction to be automatically reversed by payment system's scheduled jobs.
-
setTransactionAmount
public void setTransactionAmount(javax.money.MonetaryAmount transactionAmount)
The transaction amount that we're expecting to execute against thePaymentSummary. This amount must be valid according to what's available for thePaymentSummary. If specified, the amount details (subtotal,adjustmentsTotal,fulfillmentTotal, &taxTotal) should sum together to equal this amount.- Parameters:
transactionAmount- The transaction amount that we're expecting to execute against thePaymentSummary.
-
setSubtotal
public void setSubtotal(javax.money.MonetaryAmount subtotal)
The payment's total usually excluding adjustments, tax, and shipping.- Parameters:
subtotal- The payment's total usually excluding adjustments, tax, 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.
-
setTaxTotal
public void setTaxTotal(javax.money.MonetaryAmount taxTotal)
The payment's total tax cost.- Parameters:
taxTotal- The payment's total tax cost.
-
setSecurityCode
public void setSecurityCode(String securityCode)
The payment method security code that may be required to execute the transaction. Typically, this value is required to execute transactions against multi-use payment methods to validate that the user is the owner of the payment method.- Parameters:
securityCode- The payment method security code that may be required to execute the transaction.
-
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.
-
canEqual
protected boolean canEqual(Object other)
-
-