Class TransactionExecutionRequest
java.lang.Object
com.broadleafcommerce.cartoperation.service.provider.external.domain.payment.TransactionExecutionRequest
- All Implemented Interfaces:
Serializable
The request payload used to execute a transaction against a
PaymentSummary.- Author:
- Chris Kittrell (ckittrell)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanjavax.money.MonetaryAmountThe payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.javax.money.CurrencyUnitThe currency gathered from thegetTransactionAmount()javax.money.MonetaryAmountThe total fees related to thetransactionAmountNote: Only thetransactionAmountis required, but if this value is included, then thesubtotal,fulfillmentTotal,adjustmentsTotal,taxTotal, &includedTaxTotalshould be included also.javax.money.MonetaryAmountThe payment's total fulfillment cost.javax.money.MonetaryAmountThe amount of taxes that are included in the subtotal (VAT).The id of the payment transaction that proceeded this transaction.The id of the relatedPaymentSummarythat is meant to be used for the transaction.The id representing the customer's request to execute one or more transactions.The payment method security code that may be required to execute the transaction.A simple description of the system that initiated this transaction execution request.The ID of the source entity associated with the transaction.The type of the source entity associated with the transaction.javax.money.MonetaryAmountThe payment's total usually excluding adjustments, tax, fees, and shipping.javax.money.MonetaryAmountThe payment's total tax cost.javax.money.MonetaryAmountThe transaction amount that we're expecting to execute against thePaymentSummary.The type of transaction that is to be executed.inthashCode()booleanbooleanWhether 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.voidsetFeesTotal(javax.money.MonetaryAmount feesTotal) The total fees related to thetransactionAmountNote: Only thetransactionAmountis required, but if this value is included, then thesubtotal,fulfillmentTotal,adjustmentsTotal,taxTotal, &includedTaxTotalshould be included also.voidsetFulfillmentTotal(javax.money.MonetaryAmount fulfillmentTotal) The payment's total fulfillment cost.voidsetIncludedTaxTotal(javax.money.MonetaryAmount includedTaxTotal) The amount of taxes that are included in the subtotal (VAT).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.voidA 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, fees, 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.toString()
-
Constructor Details
-
TransactionExecutionRequest
public TransactionExecutionRequest()
-
-
Method Details
-
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
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
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
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
The type of the source entity associated with the transaction. For example, "CHECKOUT_REQUEST". -
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:
-
getTransactionType
The type of transaction that is to be executed.- Returns:
- The type of transaction that is to be executed.
- See Also:
-
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 should be equal to this amount using the following equation: transactionAmount =subtotal+fulfillmentTotal+feesTotal-adjustmentsTotal+taxTotal-includedTaxTotal.- 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, fees, and shipping. Note: Only thetransactionAmountis required, but if this value is included, then thefulfillmentTotal,feesTotal,adjustmentsTotal,taxTotal, &includedTaxTotalshould 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 thetransactionAmountis required, but if this value is included, then thesubtotal,fulfillmentTotal,feesTotal,taxTotal, &includedTaxTotalshould 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 thetransactionAmountis required, but if this value is included, then thesubtotal,feesTotal,adjustmentsTotal,taxTotal, &includedTaxTotalshould be included also.- Returns:
- The payment's total fulfillment cost.
-
getFeesTotal
public javax.money.MonetaryAmount getFeesTotal()The total fees related to thetransactionAmountNote: Only thetransactionAmountis required, but if this value is included, then thesubtotal,fulfillmentTotal,adjustmentsTotal,taxTotal, &includedTaxTotalshould be included also.- Returns:
- The total fees related to the
transactionAmount
-
getTaxTotal
public javax.money.MonetaryAmount getTaxTotal()The payment's total tax cost. Note: Only thetransactionAmountis required, but if this value is included, then thesubtotal,fulfillmentTotal,feesTotal,adjustmentsTotal, &includedTaxTotalshould 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 thetransactionAmountis required, but if this value is included, then thesubtotal,fulfillmentTotal,feesTotal,adjustmentsTotal, &taxTotalshould be included also.- Returns:
- The amount of taxes that are included in the subtotal (VAT).
-
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
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
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
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
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
The type of the source entity associated with the transaction. For example, "CHECKOUT_REQUEST". -
setSourceEntityId
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:
-
setTransactionType
The type of transaction that is to be executed.- Parameters:
transactionType- The type of transaction that is to be executed.- See Also:
-
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 should be equal to this amount using the following equation: transactionAmount =subtotal+fulfillmentTotal+feesTotal-adjustmentsTotal+taxTotal-includedTaxTotal.- 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, fees, and shipping. Note: Only thetransactionAmountis required, but if this value is included, then thefulfillmentTotal,feesTotal,adjustmentsTotal,taxTotal, &includedTaxTotalshould 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 thetransactionAmountis required, but if this value is included, then thesubtotal,fulfillmentTotal,feesTotal,taxTotal, &includedTaxTotalshould 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 thetransactionAmountis required, but if this value is included, then thesubtotal,feesTotal,adjustmentsTotal,taxTotal, &includedTaxTotalshould be included also.- Parameters:
fulfillmentTotal- The payment's total fulfillment cost.
-
setFeesTotal
public void setFeesTotal(javax.money.MonetaryAmount feesTotal) The total fees related to thetransactionAmountNote: Only thetransactionAmountis required, but if this value is included, then thesubtotal,fulfillmentTotal,adjustmentsTotal,taxTotal, &includedTaxTotalshould be included also.- Parameters:
feesTotal- The total fees related to thetransactionAmount
-
setTaxTotal
public void setTaxTotal(javax.money.MonetaryAmount taxTotal) The payment's total tax cost. Note: Only thetransactionAmountis required, but if this value is included, then thesubtotal,fulfillmentTotal,feesTotal,adjustmentsTotal, &includedTaxTotalshould 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 thetransactionAmountis required, but if this value is included, then thesubtotal,fulfillmentTotal,feesTotal,adjustmentsTotal, &taxTotalshould be included also.- Parameters:
includedTaxTotal- The amount of taxes that are included in the subtotal (VAT).
-
setSecurityCode
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
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.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-