Class Currency


  • public class Currency
    extends Object
    Currency
    • Constructor Detail

      • Currency

        public Currency()
    • 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)
      • currencyCode

        public Currency currencyCode​(String currencyCode)
      • 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)
      • getPercentage

        public Object getPercentage()
        Get percentage
        Returns:
        percentage
      • setPercentage

        public void setPercentage​(Object percentage)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • validateJsonObject

        public static void validateJsonObject​(com.google.gson.JsonObject jsonObj)
                                       throws IOException
        Validates the JSON Object and throws an exception if issues found
        Parameters:
        jsonObj - JSON Object
        Throws:
        IOException - if the JSON Object is invalid with respect to Currency
      • fromJson

        public static Currency fromJson​(String jsonString)
                                 throws IOException
        Create an instance of Currency given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of Currency
        Throws:
        IOException - if the JSON string is invalid with respect to Currency
      • toJson

        public String toJson()
        Convert an instance of Currency to an JSON string
        Returns:
        JSON string