Class PaymentDistributionResult
java.lang.Object
com.broadleafcommerce.orderoperation.domain.payment.PaymentDistributionResult
- All Implemented Interfaces:
Serializable
The domain that represents the result of distributing a
MonetaryAmount
across different
payments.- Author:
- Sunny Yu
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
Contains the additional information about this payment.List<org.apache.commons.lang3.tuple.Pair<ExecutablePayment,
javax.money.MonetaryAmount>> int
hashCode()
void
setAdditionalAttributes
(Map<String, Object> additionalAttributes) Contains the additional information about this payment.void
setDistributedPaymentAndAmounts
(List<org.apache.commons.lang3.tuple.Pair<ExecutablePayment, javax.money.MonetaryAmount>> distributedPaymentAndAmounts) toString()
-
Constructor Details
-
PaymentDistributionResult
public PaymentDistributionResult()
-
-
Method Details
-
getDistributedPaymentAndAmounts
public List<org.apache.commons.lang3.tuple.Pair<ExecutablePayment,javax.money.MonetaryAmount>> getDistributedPaymentAndAmounts()A list ofPairs
ofExecutablePayment
and theMonetaryAmount
that it's distributed.For example, an order of $100 distributed to two payments, payment1 with 40% ratio and payment2 with 60% ratio, the pairs would be
{payment1: $40} and {payment2: $60}
-
getAdditionalAttributes
Contains the additional information about this payment.- Returns:
- the map with the additional information about this payment
-
setDistributedPaymentAndAmounts
public void setDistributedPaymentAndAmounts(List<org.apache.commons.lang3.tuple.Pair<ExecutablePayment, javax.money.MonetaryAmount>> distributedPaymentAndAmounts) A list ofPairs
ofExecutablePayment
and theMonetaryAmount
that it's distributed.For example, an order of $100 distributed to two payments, payment1 with 40% ratio and payment2 with 60% ratio, the pairs would be
{payment1: $40} and {payment2: $60}
-
setAdditionalAttributes
Contains the additional information about this payment.- Parameters:
additionalAttributes
- the map with the additional information about this payment
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-