Package com.maxmind.minfraud.request
Class Email.Builder
- java.lang.Object
-
- com.maxmind.minfraud.request.Email.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Email.Builder
address(String address)
Set the email address and domain fields for the request.Email
build()
Email.Builder
domain(String domain)
Email.Builder
hashAddress()
Send the email address as its MD5 hash.
-
-
-
Method Detail
-
address
public Email.Builder address(String 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 callhashAddress()
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
public Email.Builder hashAddress()
Send the email address as its MD5 hash. By default the email address set byaddress(String)
will be sent in plain text. Enable sending it as an MD5 hash instead by calling this method.- Returns:
- The builder object.
-
domain
public Email.Builder domain(String 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
public Email build()
- Returns:
- An instance of
Email
created from the fields set on this builder.
-
-