Class Amount


  • public class Amount
    extends Object
    Amount
    • Constructor Detail

      • Amount

        public Amount()
    • Method Detail

      • getCurrency

        public String getCurrency()
        The type of currency. Must be EUR (or EUR equivalent)
        Returns:
        currency
      • setCurrency

        public void setCurrency​(String currency)
        The type of currency. Must be EUR (or EUR equivalent)
        Parameters:
        currency -
      • getValue

        public Long getValue()
        Total value of amount. Must be >= 0
        Returns:
        value
      • setValue

        public void setValue​(Long value)
        Total value of amount. Must be >= 0
        Parameters:
        value -
      • equals

        public boolean equals​(Object o)
        Return true if this Amount object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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