java.lang.Object
com.maxmind.minfraud.request.Email.Builder
- Enclosing class:
Builder
creates instances of Email
from values set by the builder's methods.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSet the email address and domain fields for the request.build()
Send the email address as its MD5 hash.
-
Constructor Details
-
Builder
public Builder()The constructor for the builder.By default, validation will be enabled.
-
Builder
public Builder(boolean enableValidation) The constructor for the builder.- Parameters:
enableValidation
- Whether validation should be enabled.
-
-
Method Details
-
address
Set the email address and domain fields for the request. If you set the email address from this method, you do not need to set the domain separately. The domain will be set to the domain of the email address and the address field will be set to the email address passed.The email address will be sent in plain text unless you also call
hashAddress()
to instead send it as an MD5 hash.- Parameters:
address
- The valid email address used in the transaction.- Returns:
- The builder object.
- Throws:
IllegalArgumentException
- when address is not a valid email address.
-
hashAddress
Send the email address as its MD5 hash.By default, the email address set by
address(String)
will be sent in plain text. Enable sending it as an MD5 hash instead by calling this method.- Returns:
- The builder object.
-
domain
- Parameters:
domain
- The domain of the email address. This only needs to be set if the email address is not set.- Returns:
- The builder object.
- Throws:
IllegalArgumentException
- when domain is not a valid domain.
-
build
- Returns:
- An instance of
Email
created from the fields set on this builder.
-