Class TransactionExecutionRequest
- All Implemented Interfaces:
Serializable
Payment
.- 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.CurrencyUnit
The currency gathered from thegetTransactionAmount()
javax.money.MonetaryAmount
The total fees related to thetransactionAmount
Note: Only thetransactionAmount
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.javax.money.MonetaryAmount
The amount of taxes that are included in the subtotal (VAT).The id of the source entity of the transaction that proceeded this transaction.The type of the source entity of the transaction that proceeded this transaction.The id of thePaymentTransaction
that proceeded this transaction.The id of the relatedPayment
that 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.MonetaryAmount
The payment's total usually excluding adjustments, tax, fees, and shipping.javax.money.MonetaryAmount
The payment's total tax cost.javax.money.MonetaryAmount
The transaction amount that we're expecting to execute against thePayment
.The starting management state of this transaction.The type of transaction that is to be executed.int
hashCode()
boolean
boolean
Whether to allow this transaction to be automatically reversed by scheduled jobs.void
setAdjustmentsTotal
(javax.money.MonetaryAmount adjustmentsTotal) The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.void
setAllowAutomaticReversal
(boolean allowAutomaticReversal) Whether to allow this transaction to be automatically reversed by scheduled jobs.void
setFeesTotal
(javax.money.MonetaryAmount feesTotal) The total fees related to thetransactionAmount
Note: Only thetransactionAmount
is required, but if this value is included, then thesubtotal
,fulfillmentTotal
,adjustmentsTotal
,taxTotal
, &includedTaxTotal
should be included also.void
setFulfillmentTotal
(javax.money.MonetaryAmount fulfillmentTotal) The payment's total fulfillment cost.void
setIncludedTaxTotal
(javax.money.MonetaryAmount includedTaxTotal) The amount of taxes that are included in the subtotal (VAT).void
setParentSourceEntityId
(String parentSourceEntityId) The id of the source entity of the transaction that proceeded this transaction.void
setParentSourceEntityType
(String parentSourceEntityType) The type of the source entity of the transaction that proceeded this transaction.void
setParentTransactionId
(String parentTransactionId) The id of thePaymentTransaction
that proceeded this transaction.void
setPaymentId
(String paymentId) The id of the relatedPayment
that is meant to be used for the transaction.void
setRequestId
(String requestId) The id representing the customer's request to execute one or more transactions.void
setSecurityCode
(String securityCode) The payment method security code that may be required to execute the transaction.void
A simple description of the system that initiated this transaction execution request.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
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
setTransactionAmount
(javax.money.MonetaryAmount transactionAmount) The transaction amount that we're expecting to execute against thePayment
.void
setTransactionManagementState
(String transactionManagementState) The starting management state of this transaction.void
setTransactionType
(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
-
hasParentSourceEntityTypeAndId
public boolean hasParentSourceEntityTypeAndId() -
getIncludedTaxTotal
public javax.money.MonetaryAmount getIncludedTaxTotal()The amount of taxes that are included in the subtotal (VAT). Getter returns default value for backward-compatability- Returns:
- The amount of taxes that are included in the subtotal (VAT).
-
getPaymentId
The id of the relatedPayment
that is meant to be used for the transaction.- Returns:
- The id of the related
Payment
that is meant to be used for the 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.
-
getParentTransactionId
The id of thePaymentTransaction
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.AUTHORIZE
transaction to execute aDefaultTransactionTypes.CAPTURE
transaction. This field is optional. If not provided, then parent transactions will be retrieved either by theparentSourceEntityType
andparentSourceEntityId
, or by thegetPaymentId()
andgetTransactionType()
.- Returns:
- The id of the
PaymentTransaction
that proceeded this transaction.
-
getParentSourceEntityType
The type of the source entity of the transaction that proceeded this transaction. This is used to identify the parent transactions within the same entity.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.Note that if this field is not provided, it will retrieve parent transactions from any entity based on
getPaymentId()
andgetTransactionType()
. -
getParentSourceEntityId
The id of the source entity of the transaction that proceeded this transaction.Note that if this field is not provided, it will retrieve parent transactions from any entity based on
getPaymentId()
andgetTransactionType()
. -
getSourceEntityType
The type of the source entity associated with the transaction. For example, "CHECKOUT_REQUEST" or "ORDER_FULFILLMENT". -
getSourceEntityId
The ID of the source entity associated with the transaction.For example, if
getSourceEntityType()
isORDER_FULFILLMENT
, this would be the ID of theOrderFulfillment
.- See Also:
-
getTransactionType
The type of transaction that is to be executed.- Returns:
- The type of transaction that is to be executed.
- See Also:
-
TransactionType
-
getTransactionManagementState
The starting management state of this transaction.- Returns:
- The starting management state of this transaction.
- See Also:
-
isAllowAutomaticReversal
public boolean isAllowAutomaticReversal()Whether to allow this transaction to be automatically reversed by scheduled jobs.Set this field to
false
if this transaction should only be allowed to be reversed by the external system.- Returns:
- Whether to allow this transaction to be automatically reversed by scheduled jobs.
- See Also:
-
getTransactionAmount
public javax.money.MonetaryAmount getTransactionAmount()The transaction amount that we're expecting to execute against thePayment
. This amount must be valid according to what's available for thePayment
. 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
Payment
.
-
getSubtotal
public javax.money.MonetaryAmount getSubtotal()The payment's total usually excluding adjustments, tax, fees, and shipping. Note: Only thetransactionAmount
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 thetransactionAmount
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 thetransactionAmount
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 thetransactionAmount
Note: Only thetransactionAmount
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
transactionAmount
-
getTaxTotal
public javax.money.MonetaryAmount getTaxTotal()The payment's total tax cost. Note: Only thetransactionAmount
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.
-
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 relatedPayment
that is meant to be used for the transaction.- Parameters:
paymentId
- The id of the relatedPayment
that is meant to be used for the 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.
-
setParentTransactionId
The id of thePaymentTransaction
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.AUTHORIZE
transaction to execute aDefaultTransactionTypes.CAPTURE
transaction. This field is optional. If not provided, then parent transactions will be retrieved either by theparentSourceEntityType
andparentSourceEntityId
, or by thegetPaymentId()
andgetTransactionType()
.- Parameters:
parentTransactionId
- The id of thePaymentTransaction
that proceeded this transaction.
-
setParentSourceEntityType
The type of the source entity of the transaction that proceeded this transaction. This is used to identify the parent transactions within the same entity.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.Note that if this field is not provided, it will retrieve parent transactions from any entity based on
getPaymentId()
andgetTransactionType()
. -
setParentSourceEntityId
The id of the source entity of the transaction that proceeded this transaction.Note that if this field is not provided, it will retrieve parent transactions from any entity based on
getPaymentId()
andgetTransactionType()
. -
setSourceEntityType
The type of the source entity associated with the transaction. For example, "CHECKOUT_REQUEST" or "ORDER_FULFILLMENT". -
setSourceEntityId
The ID of the source entity associated with the transaction.For example, if
getSourceEntityType()
isORDER_FULFILLMENT
, this would be the ID of theOrderFulfillment
.- 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:
-
TransactionType
-
setTransactionManagementState
The starting management state of this transaction.- Parameters:
transactionManagementState
- The starting management state of this transaction.- See Also:
-
setAllowAutomaticReversal
public void setAllowAutomaticReversal(boolean allowAutomaticReversal) Whether to allow this transaction to be automatically reversed by scheduled jobs.Set this field to
false
if this transaction should only be allowed to be reversed by the external system.- Parameters:
allowAutomaticReversal
- Whether to allow this transaction to be automatically reversed by scheduled jobs.- See Also:
-
setTransactionAmount
public void setTransactionAmount(javax.money.MonetaryAmount transactionAmount) The transaction amount that we're expecting to execute against thePayment
. This amount must be valid according to what's available for thePayment
. 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 thePayment
.
-
setSubtotal
public void setSubtotal(javax.money.MonetaryAmount subtotal) The payment's total usually excluding adjustments, tax, fees, and shipping. Note: Only thetransactionAmount
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 thetransactionAmount
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 thetransactionAmount
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 thetransactionAmount
Note: Only thetransactionAmount
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 thetransactionAmount
-
setTaxTotal
public void setTaxTotal(javax.money.MonetaryAmount taxTotal) The payment's total tax cost. Note: Only thetransactionAmount
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 thetransactionAmount
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).
-
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
-