Class PaymentDistributionDetail

java.lang.Object
com.broadleafcommerce.order.client.domain.payment.PaymentDistributionDetail
All Implemented Interfaces:
Serializable

public class PaymentDistributionDetail extends Object implements Serializable
Represents the amount distributed to an order's payment.

This representation is used during payment capturing & refunding to determine the percentage of the fulfillment or return amount should be distributed to each of the order's payments. For example, an item that has a total of $20 could be split into gift card of $5 and credit card of $15. The refunds from returning this item would be based off of its payment distribution details, 25% for the gift card & 75% for the credit card.

Author:
Sunny Yu
See Also:
  • Constructor Details

    • PaymentDistributionDetail

      public PaymentDistributionDetail()
  • Method Details

    • getPaymentId

      public String getPaymentId()
      The id of the payment.
    • getPaymentDisplayType

      public String getPaymentDisplayType()
      The type of the payment. Used for display purposes.
    • getRatio

      public BigDecimal getRatio()
      The percentage of the order total that is distributed to this payment, represented as a decimal. For example, if a payment is responsible for 75% of the order total, then its ratio would be 0.75
    • getAdditionalAttributes

      public Map<String,String> getAdditionalAttributes()
      General use map to capture any additional attributes needed for this detail.
    • setPaymentId

      public void setPaymentId(String paymentId)
      The id of the payment.
    • setPaymentDisplayType

      public void setPaymentDisplayType(String paymentDisplayType)
      The type of the payment. Used for display purposes.
    • setRatio

      public void setRatio(BigDecimal ratio)
      The percentage of the order total that is distributed to this payment, represented as a decimal. For example, if a payment is responsible for 75% of the order total, then its ratio would be 0.75
    • setAdditionalAttributes

      public void setAdditionalAttributes(Map<String,String> additionalAttributes)
      General use map to capture any additional attributes needed for this detail.
    • 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