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_MAX_AMOUNTstatic 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)Surcharge amount per transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).CurrencycurrencyCode(String currencyCode)Three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).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).IntegergetMaxAmount()The maximum surcharge amount per transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).DoublegetPercentage()Surcharge percentage per transaction.inthashCode()CurrencymaxAmount(Integer maxAmount)The maximum surcharge amount per transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).Currencypercentage(Double percentage)Surcharge percentage per transaction.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).voidsetMaxAmount(Integer maxAmount)The maximum surcharge amount per transaction, in [minor units](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_MAX_AMOUNT
public static final String JSON_PROPERTY_MAX_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PERCENTAGE
public static final String JSON_PROPERTY_PERCENTAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
amount
public Currency amount(Integer amount)
Surcharge amount per transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).- Parameters:
amount-- Returns:
- the current
Currencyinstance, allowing for method chaining
-
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-
-
currencyCode
public Currency currencyCode(String currencyCode)
Three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). For example, **AUD**.- Parameters:
currencyCode-- Returns:
- the current
Currencyinstance, allowing for method chaining
-
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-
-
maxAmount
public Currency maxAmount(Integer maxAmount)
The maximum surcharge amount per transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).- Parameters:
maxAmount-- Returns:
- the current
Currencyinstance, allowing for method chaining
-
getMaxAmount
public Integer getMaxAmount()
The maximum surcharge amount per transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).- Returns:
- maxAmount
-
setMaxAmount
public void setMaxAmount(Integer maxAmount)
The maximum surcharge amount per transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).- Parameters:
maxAmount-
-
percentage
public Currency percentage(Double percentage)
Surcharge percentage per transaction. The maximum number of decimal places is two. For example, **1%** or **2.27%**.- Parameters:
percentage-- Returns:
- the current
Currencyinstance, allowing for method chaining
-
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
-
-