Class PaymentDistributionDetail
java.lang.Object
com.broadleafcommerce.order.client.domain.payment.PaymentDistributionDetail
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
General use map to capture any additional attributes needed for this detail.The type of the payment.The id of the payment.getRatio()
The percentage of the order total that is distributed to this payment, represented as a decimal.int
hashCode()
void
setAdditionalAttributes
(Map<String, String> additionalAttributes) General use map to capture any additional attributes needed for this detail.void
setPaymentDisplayType
(String paymentDisplayType) The type of the payment.void
setPaymentId
(String paymentId) The id of the payment.void
setRatio
(BigDecimal ratio) The percentage of the order total that is distributed to this payment, represented as a decimal.toString()
-
Constructor Details
-
PaymentDistributionDetail
public PaymentDistributionDetail()
-
-
Method Details
-
getPaymentId
The id of the payment. -
getPaymentDisplayType
The type of the payment. Used for display purposes. -
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
General use map to capture any additional attributes needed for this detail. -
setPaymentId
The id of the payment. -
setPaymentDisplayType
The type of the payment. Used for display purposes. -
setRatio
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
General use map to capture any additional attributes needed for this detail. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-