Package com.maxmind.minfraud.request
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 ofCustomInputs
from values set by the builder's methods.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CustomInputs
build()
CustomInputs.Builder
put(String key, boolean value)
Add a boolean custom input.CustomInputs.Builder
put(String key, Number value)
Add a numeric custom input.CustomInputs.Builder
put(String key, String value)
Add a string custom input.
-
-
-
Method Detail
-
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.
-
-