Class Amount
- java.lang.Object
-
- com.adyen.model.legalentitymanagement.Amount
-
public class Amount extends Object
Amount
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_CURRENCYstatic StringJSON_PROPERTY_VALUE
-
Constructor Summary
Constructors Constructor Description Amount()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Amountcurrency(String currency)The type of currency.booleanequals(Object o)Return true if this Amount object is equal to o.static AmountfromJson(String jsonString)Create an instance of Amount given an JSON stringStringgetCurrency()The type of currency.Map<String,Object>getExplicitNulls()Returns a map of properties to be merged into the JSON payload as explicit null values.LonggetValue()Total value of amount.inthashCode()AmountincludeNullValues(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.voidsetCurrency(String currency)The type of currency.voidsetIncludeNullValues(boolean includeNullValues)Sets whether null values should be explicitly serialized in the JSON payload.voidsetValue(Long value)Total value of amount.StringtoJson()Convert an instance of Amount to an JSON stringStringtoString()Amountvalue(Long value)Total value of amount.
-
-
-
Field Detail
-
JSON_PROPERTY_CURRENCY
public static final String JSON_PROPERTY_CURRENCY
- See Also:
- Constant Field Values
-
JSON_PROPERTY_VALUE
public static final String JSON_PROPERTY_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
currency
public Amount currency(String currency)
The type of currency. Must be EUR (or EUR equivalent)- Parameters:
currency- The type of currency. Must be EUR (or EUR equivalent)- Returns:
- the current
Amountinstance, allowing for method chaining
-
getCurrency
public String getCurrency()
The type of currency. Must be EUR (or EUR equivalent)- Returns:
- currency The type of currency. Must be EUR (or EUR equivalent)
-
setCurrency
public void setCurrency(String currency)
The type of currency. Must be EUR (or EUR equivalent)- Parameters:
currency- The type of currency. Must be EUR (or EUR equivalent)
-
value
public Amount value(Long value)
Total value of amount. Must be >= 0- Parameters:
value- Total value of amount. Must be >= 0- Returns:
- the current
Amountinstance, allowing for method chaining
-
getValue
public Long getValue()
Total value of amount. Must be >= 0- Returns:
- value Total value of amount. Must be >= 0
-
setValue
public void setValue(Long value)
Total value of amount. Must be >= 0- Parameters:
value- Total value of amount. Must be >= 0
-
includeNullValues
public Amount 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 Amount 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 Amount fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of Amount given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Amount
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to Amount
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of Amount to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-