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 a PaymentSummary.
Author:
Chris Kittrell (ckittrell)
See Also:
  • Constructor Details

    • TransactionExecutionRequest

      public TransactionExecutionRequest()
  • Method Details

    • getCurrency

      @Nullable public javax.money.CurrencyUnit getCurrency()
      The currency gathered from the getTransactionAmount()
      Returns:
      The currency gathered from the request's transaction amount
    • getSourceEntityId

      @Nullable @Deprecated public String getSourceEntityId()
      Deprecated.
    • setSourceEntityId

      @Deprecated public void setSourceEntityId(String sourceEntityId)
      Deprecated.
    • hasParentTransactionId

      public boolean hasParentTransactionId()
    • getPaymentId

      public String getPaymentId()
      The id of the related PaymentSummary that is meant to be used for the transaction.
      Returns:
      The id of the related PaymentSummary that 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 an DefaultTransactionTypes.AUTHORIZE transaction to execute a DefaultTransactionTypes.CAPTURE transaction.
      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".
    • getSourceEntityIds

      public List<String> getSourceEntityIds()
      The IDs of the source entities associated with the transaction.

      For example, if getSourceEntityType() is CHECKOUT_REQUEST, this would be the ID of the checkout request.

      Since:
      Cart Operation Service 2.3.0, Release Train 2.3.0
      See Also:
    • 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:
    • isAllowAutomaticReversal

      public boolean isAllowAutomaticReversal()
      Whether to allow this transaction to be automatically reversed by payment system's scheduled jobs.

      Set this field to false if 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 the PaymentSummary. This amount must be valid according to what's available for the PaymentSummary. 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 the transactionAmount is required, but if this value is included, then the fulfillmentTotal, 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 the transactionAmount is required, but if this value is included, then the subtotal, 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 the transactionAmount is required, but if this value is included, then the subtotal, 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 the transactionAmount Note: Only the transactionAmount is required, but if this value is included, then the subtotal, 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 the transactionAmount is required, but if this value is included, then the subtotal, 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 the transactionAmount is required, but if this value is included, then the subtotal, fulfillmentTotal, feesTotal, adjustmentsTotal, & taxTotal should be included also.
      Returns:
      The amount of taxes that are included in the subtotal (VAT).
    • 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.
    • getPaymentMethodProperties

      public Map<String,Object> getPaymentMethodProperties()
      Additional data is needed to execute payment transactions, esp. properties that should not be persisted to the Payment#paymentMethodProperties in PaymentTransactionServices.
    • 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 related PaymentSummary that is meant to be used for the transaction.
      Parameters:
      paymentId - The id of the related PaymentSummary that 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 an DefaultTransactionTypes.AUTHORIZE transaction to execute a DefaultTransactionTypes.CAPTURE transaction.
      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".
    • setSourceEntityIds

      public void setSourceEntityIds(List<String> sourceEntityIds)
      The IDs of the source entities associated with the transaction.

      For example, if getSourceEntityType() is CHECKOUT_REQUEST, this would be the ID of the checkout request.

      Since:
      Cart Operation Service 2.3.0, Release Train 2.3.0
      See Also:
    • 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:
    • 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 false if 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 the PaymentSummary. This amount must be valid according to what's available for the PaymentSummary. 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 the PaymentSummary.
    • setSubtotal

      public void setSubtotal(javax.money.MonetaryAmount subtotal)
      The payment's total usually excluding adjustments, tax, fees, and shipping. Note: Only the transactionAmount is required, but if this value is included, then the fulfillmentTotal, 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 the transactionAmount is required, but if this value is included, then the subtotal, 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 the transactionAmount is required, but if this value is included, then the subtotal, 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 the transactionAmount Note: Only the transactionAmount is required, but if this value is included, then the subtotal, fulfillmentTotal, adjustmentsTotal, taxTotal, & includedTaxTotal should be included also.
      Parameters:
      feesTotal - The total fees related to the transactionAmount
    • setTaxTotal

      public void setTaxTotal(javax.money.MonetaryAmount taxTotal)
      The payment's total tax cost. Note: Only the transactionAmount is required, but if this value is included, then the subtotal, 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 the transactionAmount is required, but if this value is included, then the subtotal, fulfillmentTotal, feesTotal, adjustmentsTotal, & taxTotal should be included also.
      Parameters:
      includedTaxTotal - The amount of taxes that are included in the subtotal (VAT).
    • 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.
    • setPaymentMethodProperties

      public void setPaymentMethodProperties(Map<String,Object> paymentMethodProperties)
      Additional data is needed to execute payment transactions, esp. properties that should not be persisted to the Payment#paymentMethodProperties in PaymentTransactionServices.
    • 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.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object