Package com.adyen.model.management
Class Currency
- java.lang.Object
-
- com.adyen.model.management.Currency
-
public class Currency extends Object
Currency
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_AMOUNTstatic StringJSON_PROPERTY_CURRENCY_CODEstatic StringJSON_PROPERTY_PERCENTAGE
-
Constructor Summary
Constructors Constructor Description Currency()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Currencyamount(Integer amount)CurrencycurrencyCode(String currencyCode)booleanequals(Object o)Return true if this Currency object is equal to o.static CurrencyfromJson(String jsonString)Create an instance of Currency given an JSON stringIntegergetAmount()Surcharge amount per transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).StringgetCurrencyCode()Three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).DoublegetPercentage()Surcharge percentage per transaction.inthashCode()Currencypercentage(Double percentage)voidsetAmount(Integer amount)Surcharge amount per transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).voidsetCurrencyCode(String currencyCode)Three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).voidsetPercentage(Double percentage)Surcharge percentage per transaction.StringtoJson()Convert an instance of Currency to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_AMOUNT
public static final String JSON_PROPERTY_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_CURRENCY_CODE
public static final String JSON_PROPERTY_CURRENCY_CODE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PERCENTAGE
public static final String JSON_PROPERTY_PERCENTAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAmount
public Integer getAmount()
Surcharge amount per transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).- Returns:
- amount
-
setAmount
public void setAmount(Integer amount)
Surcharge amount per transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).- Parameters:
amount-
-
getCurrencyCode
public String getCurrencyCode()
Three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). For example, **AUD**.- Returns:
- currencyCode
-
setCurrencyCode
public void setCurrencyCode(String currencyCode)
Three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). For example, **AUD**.- Parameters:
currencyCode-
-
getPercentage
public Double getPercentage()
Surcharge percentage per transaction. The maximum number of decimal places is two. For example, **1%** or **2.27%**.- Returns:
- percentage
-
setPercentage
public void setPercentage(Double percentage)
Surcharge percentage per transaction. The maximum number of decimal places is two. For example, **1%** or **2.27%**.- Parameters:
percentage-
-
equals
public boolean equals(Object o)
Return true if this Currency object is equal to o.
-
fromJson
public static Currency fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of Currency given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Currency
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to Currency
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of Currency to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-