Class PaymentDistributionResult

java.lang.Object
com.broadleafcommerce.orderoperation.domain.payment.PaymentDistributionResult
All Implemented Interfaces:
Serializable

public class PaymentDistributionResult extends Object implements Serializable
The domain that represents the result of distributing a MonetaryAmount across different payments.
Author:
Sunny Yu
See Also:
  • Constructor Details

    • PaymentDistributionResult

      public PaymentDistributionResult()
  • Method Details

    • getDistributedPaymentAndAmounts

      public List<org.apache.commons.lang3.tuple.Pair<ExecutablePayment,javax.money.MonetaryAmount>> getDistributedPaymentAndAmounts()
      A list of Pairs of ExecutablePayment and the MonetaryAmount 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

      public Map<String,Object> 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 of Pairs of ExecutablePayment and the MonetaryAmount 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

      public void setAdditionalAttributes(Map<String,Object> additionalAttributes)
      Contains the additional information about this payment.
      Parameters:
      additionalAttributes - the map with the additional information about this payment
    • 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