Package com.adyen.model.tapi
Class AmountsReq
- java.lang.Object
-
- com.adyen.model.tapi.AmountsReq
-
public class AmountsReq extends Object
Various amounts related to the payment request from the Sale System.
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_CASH_BACK_AMOUNTstatic StringJSON_PROPERTY_CURRENCYstatic StringJSON_PROPERTY_MAXIMUM_CASH_BACK_AMOUNTstatic StringJSON_PROPERTY_MINIMUM_AMOUNT_TO_DELIVERstatic StringJSON_PROPERTY_MINIMUM_SPLIT_AMOUNTstatic StringJSON_PROPERTY_PAID_AMOUNTstatic StringJSON_PROPERTY_REQUESTED_AMOUNTstatic StringJSON_PROPERTY_TIP_AMOUNT
-
Constructor Summary
Constructors Constructor Description AmountsReq()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AmountsReqcashBackAmount(BigDecimal cashBackAmount)The cash-back part of the amount requested by the Sale for the payment.AmountsReqcurrency(String currency)Currency of a monetary amount.booleanequals(Object o)Return true if this AmountsReq object is equal to o.static AmountsReqfromJson(String jsonString)Create an instance of AmountsReq given an JSON stringBigDecimalgetCashBackAmount()The cash-back part of the amount requested by the Sale for the payment. minimum: 0.0 maximum: 99999999.999999StringgetCurrency()Currency of a monetary amount.Map<String,Object>getExplicitNulls()Returns a map of properties to be merged into the JSON payload as explicit null values.BigDecimalgetMaximumCashBackAmount()Maximum amount which could be requested for cash-back to the Sale System.BigDecimalgetMinimumAmountToDeliver()Minimum amount the Sale System is allowed to deliver for this payment.BigDecimalgetMinimumSplitAmount()Minimum amount of a split, which could be requested by a Customer.Allows the Merchant to limit the number of split requested by the Customer. minimum: 0.0 maximum: 99999999.999999BigDecimalgetPaidAmount()Amount already paid in case of split payment.BigDecimalgetRequestedAmount()Amount requested by the Sale for the payment. minimum: 0.0 maximum: 99999999.999999BigDecimalgetTipAmount()Amount paid for a tip.inthashCode()AmountsReqincludeNullValues(boolean includeNullValues)Configures whether null values are explicitly serialized in the JSON payload.booleanisIncludeNullValues()Returns whether null values are explicitly serialized in the JSON payload.AmountsReqmaximumCashBackAmount(BigDecimal maximumCashBackAmount)Maximum amount which could be requested for cash-back to the Sale System.AmountsReqminimumAmountToDeliver(BigDecimal minimumAmountToDeliver)Minimum amount the Sale System is allowed to deliver for this payment.AmountsReqminimumSplitAmount(BigDecimal minimumSplitAmount)Minimum amount of a split, which could be requested by a Customer.Allows the Merchant to limit the number of split requested by the Customer.AmountsReqpaidAmount(BigDecimal paidAmount)Amount already paid in case of split payment.AmountsReqrequestedAmount(BigDecimal requestedAmount)Amount requested by the Sale for the payment.voidsetCashBackAmount(BigDecimal cashBackAmount)The cash-back part of the amount requested by the Sale for the payment.voidsetCurrency(String currency)Currency of a monetary amount.voidsetIncludeNullValues(boolean includeNullValues)Sets whether null values should be explicitly serialized in the JSON payload.voidsetMaximumCashBackAmount(BigDecimal maximumCashBackAmount)Maximum amount which could be requested for cash-back to the Sale System.voidsetMinimumAmountToDeliver(BigDecimal minimumAmountToDeliver)Minimum amount the Sale System is allowed to deliver for this payment.voidsetMinimumSplitAmount(BigDecimal minimumSplitAmount)Minimum amount of a split, which could be requested by a Customer.Allows the Merchant to limit the number of split requested by the Customer.voidsetPaidAmount(BigDecimal paidAmount)Amount already paid in case of split payment.voidsetRequestedAmount(BigDecimal requestedAmount)Amount requested by the Sale for the payment.voidsetTipAmount(BigDecimal tipAmount)Amount paid for a tip.AmountsReqtipAmount(BigDecimal tipAmount)Amount paid for a tip.StringtoJson()Convert an instance of AmountsReq to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_CURRENCY
public static final String JSON_PROPERTY_CURRENCY
- See Also:
- Constant Field Values
-
JSON_PROPERTY_REQUESTED_AMOUNT
public static final String JSON_PROPERTY_REQUESTED_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_CASH_BACK_AMOUNT
public static final String JSON_PROPERTY_CASH_BACK_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_TIP_AMOUNT
public static final String JSON_PROPERTY_TIP_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PAID_AMOUNT
public static final String JSON_PROPERTY_PAID_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_MINIMUM_AMOUNT_TO_DELIVER
public static final String JSON_PROPERTY_MINIMUM_AMOUNT_TO_DELIVER
- See Also:
- Constant Field Values
-
JSON_PROPERTY_MAXIMUM_CASH_BACK_AMOUNT
public static final String JSON_PROPERTY_MAXIMUM_CASH_BACK_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_MINIMUM_SPLIT_AMOUNT
public static final String JSON_PROPERTY_MINIMUM_SPLIT_AMOUNT
- See Also:
- Constant Field Values
-
-
Method Detail
-
currency
public AmountsReq currency(String currency)
Currency of a monetary amount.- Parameters:
currency- Currency of a monetary amount.- Returns:
- the current
AmountsReqinstance, allowing for method chaining
-
getCurrency
public String getCurrency()
Currency of a monetary amount.- Returns:
- currency Currency of a monetary amount.
-
setCurrency
public void setCurrency(String currency)
Currency of a monetary amount.- Parameters:
currency- Currency of a monetary amount.
-
requestedAmount
public AmountsReq requestedAmount(BigDecimal requestedAmount)
Amount requested by the Sale for the payment.- Parameters:
requestedAmount- Amount requested by the Sale for the payment.- Returns:
- the current
AmountsReqinstance, allowing for method chaining
-
getRequestedAmount
public BigDecimal getRequestedAmount()
Amount requested by the Sale for the payment. minimum: 0.0 maximum: 99999999.999999- Returns:
- requestedAmount Amount requested by the Sale for the payment.
-
setRequestedAmount
public void setRequestedAmount(BigDecimal requestedAmount)
Amount requested by the Sale for the payment.- Parameters:
requestedAmount- Amount requested by the Sale for the payment.
-
cashBackAmount
public AmountsReq cashBackAmount(BigDecimal cashBackAmount)
The cash-back part of the amount requested by the Sale for the payment.- Parameters:
cashBackAmount- The cash-back part of the amount requested by the Sale for the payment.- Returns:
- the current
AmountsReqinstance, allowing for method chaining
-
getCashBackAmount
public BigDecimal getCashBackAmount()
The cash-back part of the amount requested by the Sale for the payment. minimum: 0.0 maximum: 99999999.999999- Returns:
- cashBackAmount The cash-back part of the amount requested by the Sale for the payment.
-
setCashBackAmount
public void setCashBackAmount(BigDecimal cashBackAmount)
The cash-back part of the amount requested by the Sale for the payment.- Parameters:
cashBackAmount- The cash-back part of the amount requested by the Sale for the payment.
-
tipAmount
public AmountsReq tipAmount(BigDecimal tipAmount)
Amount paid for a tip. Allow the printing of the tip on the receipt, and to qualify the tip part of the amount.- Parameters:
tipAmount- Amount paid for a tip. Allow the printing of the tip on the receipt, and to qualify the tip part of the amount.- Returns:
- the current
AmountsReqinstance, allowing for method chaining
-
getTipAmount
public BigDecimal getTipAmount()
Amount paid for a tip. Allow the printing of the tip on the receipt, and to qualify the tip part of the amount. minimum: 0.0 maximum: 99999999.999999- Returns:
- tipAmount Amount paid for a tip. Allow the printing of the tip on the receipt, and to qualify the tip part of the amount.
-
setTipAmount
public void setTipAmount(BigDecimal tipAmount)
Amount paid for a tip. Allow the printing of the tip on the receipt, and to qualify the tip part of the amount.- Parameters:
tipAmount- Amount paid for a tip. Allow the printing of the tip on the receipt, and to qualify the tip part of the amount.
-
paidAmount
public AmountsReq paidAmount(BigDecimal paidAmount)
Amount already paid in case of split payment. Depending on the context, a split payment is either a split amount, or a split basket (required by some payment means as fleet cards). The PaidAmount is present when the split payment is a split of the amount. Split of the basket involves two Sale Transactions, and does not have to be recognised by the POI.- Parameters:
paidAmount- Amount already paid in case of split payment. Depending on the context, a split payment is either a split amount, or a split basket (required by some payment means as fleet cards). The PaidAmount is present when the split payment is a split of the amount. Split of the basket involves two Sale Transactions, and does not have to be recognised by the POI.- Returns:
- the current
AmountsReqinstance, allowing for method chaining
-
getPaidAmount
public BigDecimal getPaidAmount()
Amount already paid in case of split payment. Depending on the context, a split payment is either a split amount, or a split basket (required by some payment means as fleet cards). The PaidAmount is present when the split payment is a split of the amount. Split of the basket involves two Sale Transactions, and does not have to be recognised by the POI. minimum: 0.0 maximum: 99999999.999999- Returns:
- paidAmount Amount already paid in case of split payment. Depending on the context, a split payment is either a split amount, or a split basket (required by some payment means as fleet cards). The PaidAmount is present when the split payment is a split of the amount. Split of the basket involves two Sale Transactions, and does not have to be recognised by the POI.
-
setPaidAmount
public void setPaidAmount(BigDecimal paidAmount)
Amount already paid in case of split payment. Depending on the context, a split payment is either a split amount, or a split basket (required by some payment means as fleet cards). The PaidAmount is present when the split payment is a split of the amount. Split of the basket involves two Sale Transactions, and does not have to be recognised by the POI.- Parameters:
paidAmount- Amount already paid in case of split payment. Depending on the context, a split payment is either a split amount, or a split basket (required by some payment means as fleet cards). The PaidAmount is present when the split payment is a split of the amount. Split of the basket involves two Sale Transactions, and does not have to be recognised by the POI.
-
minimumAmountToDeliver
public AmountsReq minimumAmountToDeliver(BigDecimal minimumAmountToDeliver)
Minimum amount the Sale System is allowed to deliver for this payment. For the OneTimeReservation, when the maximum amount is unknown, the Sale System indicates the minimum amount it allows.- Parameters:
minimumAmountToDeliver- Minimum amount the Sale System is allowed to deliver for this payment. For the OneTimeReservation, when the maximum amount is unknown, the Sale System indicates the minimum amount it allows.- Returns:
- the current
AmountsReqinstance, allowing for method chaining
-
getMinimumAmountToDeliver
public BigDecimal getMinimumAmountToDeliver()
Minimum amount the Sale System is allowed to deliver for this payment. For the OneTimeReservation, when the maximum amount is unknown, the Sale System indicates the minimum amount it allows. minimum: 0.0 maximum: 99999999.999999- Returns:
- minimumAmountToDeliver Minimum amount the Sale System is allowed to deliver for this payment. For the OneTimeReservation, when the maximum amount is unknown, the Sale System indicates the minimum amount it allows.
-
setMinimumAmountToDeliver
public void setMinimumAmountToDeliver(BigDecimal minimumAmountToDeliver)
Minimum amount the Sale System is allowed to deliver for this payment. For the OneTimeReservation, when the maximum amount is unknown, the Sale System indicates the minimum amount it allows.- Parameters:
minimumAmountToDeliver- Minimum amount the Sale System is allowed to deliver for this payment. For the OneTimeReservation, when the maximum amount is unknown, the Sale System indicates the minimum amount it allows.
-
maximumCashBackAmount
public AmountsReq maximumCashBackAmount(BigDecimal maximumCashBackAmount)
Maximum amount which could be requested for cash-back to the Sale System. Allows the Cashier to limit the amount value of cash-back to deliver to the Customer.- Parameters:
maximumCashBackAmount- Maximum amount which could be requested for cash-back to the Sale System. Allows the Cashier to limit the amount value of cash-back to deliver to the Customer.- Returns:
- the current
AmountsReqinstance, allowing for method chaining
-
getMaximumCashBackAmount
public BigDecimal getMaximumCashBackAmount()
Maximum amount which could be requested for cash-back to the Sale System. Allows the Cashier to limit the amount value of cash-back to deliver to the Customer. minimum: 0.0 maximum: 99999999.999999- Returns:
- maximumCashBackAmount Maximum amount which could be requested for cash-back to the Sale System. Allows the Cashier to limit the amount value of cash-back to deliver to the Customer.
-
setMaximumCashBackAmount
public void setMaximumCashBackAmount(BigDecimal maximumCashBackAmount)
Maximum amount which could be requested for cash-back to the Sale System. Allows the Cashier to limit the amount value of cash-back to deliver to the Customer.- Parameters:
maximumCashBackAmount- Maximum amount which could be requested for cash-back to the Sale System. Allows the Cashier to limit the amount value of cash-back to deliver to the Customer.
-
minimumSplitAmount
public AmountsReq minimumSplitAmount(BigDecimal minimumSplitAmount)
Minimum amount of a split, which could be requested by a Customer.Allows the Merchant to limit the number of split requested by the Customer.- Parameters:
minimumSplitAmount- Minimum amount of a split, which could be requested by a Customer.Allows the Merchant to limit the number of split requested by the Customer.- Returns:
- the current
AmountsReqinstance, allowing for method chaining
-
getMinimumSplitAmount
public BigDecimal getMinimumSplitAmount()
Minimum amount of a split, which could be requested by a Customer.Allows the Merchant to limit the number of split requested by the Customer. minimum: 0.0 maximum: 99999999.999999- Returns:
- minimumSplitAmount Minimum amount of a split, which could be requested by a Customer.Allows the Merchant to limit the number of split requested by the Customer.
-
setMinimumSplitAmount
public void setMinimumSplitAmount(BigDecimal minimumSplitAmount)
Minimum amount of a split, which could be requested by a Customer.Allows the Merchant to limit the number of split requested by the Customer.- Parameters:
minimumSplitAmount- Minimum amount of a split, which could be requested by a Customer.Allows the Merchant to limit the number of split requested by the Customer.
-
includeNullValues
public AmountsReq includeNullValues(boolean includeNullValues)
Configures whether null values are explicitly serialized in the JSON payload. Default is false.
-
isIncludeNullValues
public boolean isIncludeNullValues()
Returns whether null values are explicitly serialized in the JSON payload.
-
setIncludeNullValues
public void setIncludeNullValues(boolean includeNullValues)
Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
-
equals
public boolean equals(Object o)
Return true if this AmountsReq object is equal to o.
-
getExplicitNulls
public Map<String,Object> getExplicitNulls()
Returns a map of properties to be merged into the JSON payload as explicit null values.
-
fromJson
public static AmountsReq fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of AmountsReq given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of AmountsReq
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to AmountsReq
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of AmountsReq to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-