Class Surcharge


  • public class Surcharge
    extends Object
    Surcharge
    • Constructor Detail

      • Surcharge

        public Surcharge()
    • Method Detail

      • askConfirmation

        public Surcharge askConfirmation​(Boolean askConfirmation)
      • getAskConfirmation

        public Boolean getAskConfirmation()
        Show the surcharge details on the terminal, so the shopper can confirm.
        Returns:
        askConfirmation
      • setAskConfirmation

        public void setAskConfirmation​(Boolean askConfirmation)
      • getConfigurations

        public List<ModelConfiguration> getConfigurations()
        Surcharge fees or percentages for specific payment methods, funding sources (credit or debit), and currencies.
        Returns:
        configurations
      • 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 Surcharge
      • fromJson

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

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