Class TransactionExecutionRequest

java.lang.Object
com.broadleafcommerce.billing.service.provider.domain.TransactionExecutionRequest
All Implemented Interfaces:
Serializable

public class TransactionExecutionRequest extends Object implements Serializable
The request payload used to execute a transaction against a payment.
Author:
Chris Kittrell (ckittrell)
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected 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 the getTransactionAmount()
    javax.money.MonetaryAmount
    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.
    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 representing the customer's request to execute one or more transactions.
    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 the payment.
    int
     
    void
    setAdjustmentsTotal(javax.money.MonetaryAmount adjustmentsTotal)
    The payment's adjustments (a.k.a discounts) total, usually excluding shipping/fulfillment discounts.
    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.
    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
    setRequestId(String requestId)
    The id representing the customer's request to execute one or more transactions.
    void
    setSource(String source)
    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 the payment.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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
    • 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" or "ORDER_FULFILLMENT".
    • getSourceEntityId

      public String getSourceEntityId()
      The ID of the source entity associated with the transaction.

      For example, if getSourceEntityType() is ORDER_FULFILLMENT, this would be the ID of the OrderFulfillment.

      See Also:
    • getTransactionAmount

      public javax.money.MonetaryAmount getTransactionAmount()
      The transaction amount that we're expecting to execute against the payment. This amount must be valid according to what's available for the payment. 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 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).
    • 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.
    • 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" or "ORDER_FULFILLMENT".
    • setSourceEntityId

      public void setSourceEntityId(String sourceEntityId)
      The ID of the source entity associated with the transaction.

      For example, if getSourceEntityType() is ORDER_FULFILLMENT, this would be the ID of the OrderFulfillment.

      See Also:
    • setTransactionAmount

      public void setTransactionAmount(javax.money.MonetaryAmount transactionAmount)
      The transaction amount that we're expecting to execute against the payment. This amount must be valid according to what's available for the payment. 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 payment.
    • 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).
    • 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