Class Amount


  • public class Amount
    extends Object
    Amount
    • Constructor Detail

      • Amount

        public Amount()
    • Method Detail

      • currency

        public Amount currency​(String currency)
        The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes).
        Parameters:
        currency -
        Returns:
        the current Amount instance, allowing for method chaining
      • getCurrency

        public String getCurrency()
        The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes).
        Returns:
        currency
      • setCurrency

        public void setCurrency​(String currency)
        The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes).
        Parameters:
        currency -
      • value

        public Amount value​(Long value)
        The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).
        Parameters:
        value -
        Returns:
        the current Amount instance, allowing for method chaining
      • getValue

        public Long getValue()
        The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).
        Returns:
        value
      • setValue

        public void setValue​(Long value)
        The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).
        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