Class AmountAllocation


  • public final class AmountAllocation
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      AmountAllocation()  
      AmountAllocation​(java.lang.String id, java.lang.Long amount, java.lang.String reference, Commission commission)
      Creates a new AmountAllocation instance.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static AmountAllocation.AmountAllocationBuilder builder()  
      boolean equals​(java.lang.Object o)  
      java.lang.Long getAmount()
      The split amount, in minor currency units.
      Commission getCommission()
      The commission you'd like to collect from the split, calculated using the formula: commission = (amount * commission.percentage) + commission.amount.
      java.lang.String getId()
      The sub-entity's ID.
      java.lang.String getReference()
      A reference you can use to identify the split.
      int hashCode()  
      void setAmount​(java.lang.Long amount)
      The split amount, in minor currency units.
      void setCommission​(Commission commission)
      The commission you'd like to collect from the split, calculated using the formula: commission = (amount * commission.percentage) + commission.amount.
      void setId​(java.lang.String id)
      The sub-entity's ID.
      void setReference​(java.lang.String reference)
      A reference you can use to identify the split.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AmountAllocation

        public AmountAllocation()
      • AmountAllocation

        public AmountAllocation​(java.lang.String id,
                                java.lang.Long amount,
                                java.lang.String reference,
                                Commission commission)
        Creates a new AmountAllocation instance.
        Parameters:
        id - The sub-entity's ID.
        amount - The split amount, in minor currency units. The sum of all split amounts must be equal to the payment amount. The split amount will be credited to your sub-entity's currency account.
        reference - A reference you can use to identify the split. For example, an order number.
        commission - The commission you'd like to collect from the split, calculated using the formula: commission = (amount * commission.percentage) + commission.amount. The commission cannot exceed the split amount. Commission will be credited to your currency account.
    • Method Detail

      • getId

        public java.lang.String getId()
        The sub-entity's ID.
      • getAmount

        public java.lang.Long getAmount()
        The split amount, in minor currency units. The sum of all split amounts must be equal to the payment amount. The split amount will be credited to your sub-entity's currency account.
      • getReference

        public java.lang.String getReference()
        A reference you can use to identify the split. For example, an order number.
      • getCommission

        public Commission getCommission()
        The commission you'd like to collect from the split, calculated using the formula: commission = (amount * commission.percentage) + commission.amount. The commission cannot exceed the split amount. Commission will be credited to your currency account.
      • setId

        public void setId​(java.lang.String id)
        The sub-entity's ID.
      • setAmount

        public void setAmount​(java.lang.Long amount)
        The split amount, in minor currency units. The sum of all split amounts must be equal to the payment amount. The split amount will be credited to your sub-entity's currency account.
      • setReference

        public void setReference​(java.lang.String reference)
        A reference you can use to identify the split. For example, an order number.
      • setCommission

        public void setCommission​(Commission commission)
        The commission you'd like to collect from the split, calculated using the formula: commission = (amount * commission.percentage) + commission.amount. The commission cannot exceed the split amount. Commission will be credited to your currency account.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object