|
7 | 7 | * This class contains minFraud response data related to the email address. |
8 | 8 | */ |
9 | 9 | public final class Email extends AbstractModel { |
| 10 | + private final Boolean isDisposable; |
10 | 11 | private final Boolean isFree; |
11 | 12 | private final Boolean isHighRisk; |
12 | 13 | private final String firstSeen; |
13 | 14 |
|
14 | 15 | public Email( |
| 16 | + @JsonProperty("is_disposable") Boolean isDisposable, |
15 | 17 | @JsonProperty("is_free") Boolean isFree, |
16 | 18 | @JsonProperty("is_high_risk") Boolean isHighRisk, |
17 | 19 | @JsonProperty("first_seen") String firstSeen |
18 | 20 | ) { |
| 21 | + this.isDisposable = isDisposable; |
19 | 22 | this.isFree = isFree; |
20 | 23 | this.isHighRisk = isHighRisk; |
21 | 24 | this.firstSeen = firstSeen; |
22 | 25 | } |
23 | 26 |
|
| 27 | + // The following constructors are for backward compatibility and |
| 28 | + // can be removed as part of a major release |
| 29 | + public Email( |
| 30 | + Boolean isFree, |
| 31 | + Boolean isHighRisk, |
| 32 | + String firstSeen |
| 33 | + ) { |
| 34 | + this(null, isFree, isHighRisk, firstSeen); |
| 35 | + } |
| 36 | + |
24 | 37 | public Email( |
25 | 38 | Boolean isFree, |
26 | 39 | Boolean isHighRisk |
27 | 40 | ) { |
28 | | - this(isFree, isHighRisk, null); |
| 41 | + this(null, isFree, isHighRisk, null); |
29 | 42 | } |
30 | 43 |
|
31 | 44 | public Email() { |
32 | 45 | this(null, null, null); |
33 | 46 | } |
34 | 47 |
|
| 48 | + |
| 49 | + /** |
| 50 | + * @return Whether the email address is from a disposable email provider. |
| 51 | + * If no email address was passed, this will be {@code null}. |
| 52 | + */ |
| 53 | + @JsonProperty("is_disposable") |
| 54 | + public Boolean isDisposable() { |
| 55 | + return isDisposable; |
| 56 | + } |
| 57 | + |
35 | 58 | /** |
| 59 | + * /** |
| 60 | + * |
36 | 61 | * @return True if the email address is for a free email service provider. |
37 | 62 | */ |
38 | 63 | @JsonProperty("is_free") |
|
0 commit comments