Class CustomInputs.Builder

java.lang.Object
com.maxmind.minfraud.request.CustomInputs.Builder
Enclosing class:
CustomInputs

public static class CustomInputs.Builder extends Object
Builder creates instances of CustomInputs from values set by the builder's methods.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • put

      public CustomInputs.Builder put(String key, String value)
      Add a string custom input.
      Parameters:
      key - The key for the custom input as defined on your account portal.
      value - The custom input value. Must be less than 256 characters and must not contain new lines.
      Returns:
      The builder object.
      Throws:
      IllegalArgumentException - when the key or value are invalid.
    • put

      public CustomInputs.Builder put(String key, Number value)
      Add a numeric custom input.
      Parameters:
      key - The key for the custom input as defined on your account portal.
      value - The custom input value. Must be between -10^13 and 10^13 exclusive.
      Returns:
      The builder object.
      Throws:
      IllegalArgumentException - when the key or value are invalid.
    • put

      public CustomInputs.Builder put(String key, boolean value)
      Add a boolean custom input.
      Parameters:
      key - The key for the custom input as defined on your account portal.
      value - The custom input value.
      Returns:
      The builder object.
      Throws:
      IllegalArgumentException - when the key or value are invalid.
    • build

      public CustomInputs build()
      Returns:
      An instance of CustomInputs created from the fields set on this builder.