Class AmountAllocation
- java.lang.Object
-
- com.checkout.handlepaymentsandpayouts.flow.paymentsessions.requests.AmountAllocation
-
public final class AmountAllocation extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAmountAllocation.AmountAllocationBuilder
-
Constructor Summary
Constructors Constructor Description AmountAllocation()AmountAllocation(java.lang.String id, java.lang.Long amount, java.lang.String reference, Commission commission)Creates a newAmountAllocationinstance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AmountAllocation.AmountAllocationBuilderbuilder()booleanequals(java.lang.Object o)java.lang.LonggetAmount()The split amount, in minor currency units.CommissiongetCommission()The commission you'd like to collect from the split, calculated using the formula: commission = (amount * commission.percentage) + commission.amount.java.lang.StringgetId()The sub-entity's ID.java.lang.StringgetReference()A reference you can use to identify the split.inthashCode()voidsetAmount(java.lang.Long amount)The split amount, in minor currency units.voidsetCommission(Commission commission)The commission you'd like to collect from the split, calculated using the formula: commission = (amount * commission.percentage) + commission.amount.voidsetId(java.lang.String id)The sub-entity's ID.voidsetReference(java.lang.String reference)A reference you can use to identify the split.java.lang.StringtoString()
-
-
-
Constructor Detail
-
AmountAllocation
public AmountAllocation()
-
AmountAllocation
public AmountAllocation(java.lang.String id, java.lang.Long amount, java.lang.String reference, Commission commission)Creates a newAmountAllocationinstance.- 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
-
builder
public static AmountAllocation.AmountAllocationBuilder builder()
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-