Skip to content

Commit e2da159

Browse files
committed
Remove deprecated code
1 parent 7e007e4 commit e2da159

17 files changed

Lines changed: 55 additions & 347 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ CHANGELOG
1818
deprecated in favor of `getUri()`. Constructors that took a `URL` have
1919
been replaced with the equivalent taking a `URI`.
2020
* Deprecated constructors on model classes were removed.
21+
* Removed deprecated response methods:
22+
* `Email.getAddressMd5()`
23+
* `Subscores.getEmailTenure()`
24+
* `Subscores.getIpTenure()`
25+
* Removed `GeoIp2Country` and its associated `isHighRisk()` method.
26+
`IpAddress.getCountry()` now returns a `com.maxmind.geoip2.record.Country`.
27+
* Removed deprecated `Payment.Processor.VERAPAY` enum value. Use `VEREPAY`
28+
instead.
2129
* Upgraded the `geoip2` dependency to 2.16.1. This adds mobile country code
2230
(MCC) and mobile network code (MNC) to minFraud Insights and Factors
2331
responses. These are available at

src/main/java/com/maxmind/minfraud/request/Email.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.maxmind.minfraud.request;
22

3-
import com.fasterxml.jackson.annotation.JsonIgnore;
43
import com.fasterxml.jackson.annotation.JsonProperty;
54
import com.maxmind.minfraud.AbstractModel;
65
import org.apache.commons.codec.digest.DigestUtils;
@@ -203,20 +202,6 @@ private String cleanDomain(String domain) {
203202
return domain;
204203
}
205204

206-
/**
207-
* @return The MD5 hash of the email address if you set an address using
208-
* {@link Builder#address(String)}, or null if you did not.
209-
* @deprecated {@link #getAddress()} should be used instead.
210-
*/
211-
@JsonIgnore
212-
@Deprecated
213-
public String getAddressMd5() {
214-
if (address == null) {
215-
return null;
216-
}
217-
return DigestUtils.md5Hex(cleanAddress(address));
218-
}
219-
220205
/**
221206
* @return The domain of the email address used in the transaction.
222207
*/

src/main/java/com/maxmind/minfraud/request/Payment.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,6 @@ public enum Processor {
238238
TSYS,
239239
USA_EPAY,
240240
VANTIV,
241-
/**
242-
* @deprecated Use VEREPAY. This was a misspelling.
243-
*/
244-
@Deprecated
245-
VERAPAY,
246241
VEREPAY,
247242
VERICHECK,
248243
VINDICIA,

src/main/java/com/maxmind/minfraud/response/CreditCard.java

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -19,50 +19,13 @@ public final class CreditCard extends AbstractModel {
1919
/**
2020
* @param brand The credit card brand.
2121
* @param country The country the card was issued in.
22-
* @param isIssuedInBillingAddressCountry Whether the issuing country matches billing country.
23-
* @param isPrepaid Whether the card was prepaid.
24-
* @param issuer The issuer information.
25-
* @param type The type.
26-
* @deprecated This constructor only exists for backward compatibility
27-
* and will be removed in the next major release.
28-
*/
29-
public CreditCard(
30-
String brand,
31-
String country,
32-
Boolean isIssuedInBillingAddressCountry,
33-
Boolean isPrepaid,
34-
Issuer issuer,
35-
String type
36-
) {
37-
this(brand, country, isIssuedInBillingAddressCountry, isPrepaid, false,
38-
issuer, type);
39-
}
40-
41-
/**
42-
* @param brand The credit card brand.
43-
* @param country The country the card was issued in.
22+
* @param isBusiness Whether it is a business card.
4423
* @param isIssuedInBillingAddressCountry Whether the issuing country matches billing country.
4524
* @param isPrepaid Whether the card was prepaid.
4625
* @param isVirtual Whether it is a virtual card.
4726
* @param issuer The issuer information.
4827
* @param type The type.
49-
* @deprecated This constructor only exists for backward compatibility
50-
* and will be removed in the next major release.
5128
*/
52-
public CreditCard(
53-
String brand,
54-
String country,
55-
Boolean isIssuedInBillingAddressCountry,
56-
Boolean isPrepaid,
57-
Boolean isVirtual,
58-
Issuer issuer,
59-
String type
60-
) {
61-
this(brand, country, false, isIssuedInBillingAddressCountry, isPrepaid,
62-
isVirtual, issuer, type);
63-
}
64-
65-
6629
public CreditCard(
6730
@JsonProperty("brand") String brand,
6831
@JsonProperty("country") String country,
@@ -84,7 +47,7 @@ public CreditCard(
8447
}
8548

8649
public CreditCard() {
87-
this(null, null, null, null, null, null, null);
50+
this(null, null, null, null, null, null, null, null);
8851
}
8952

9053
/**

src/main/java/com/maxmind/minfraud/response/Device.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,8 @@ public final class Device extends AbstractModel {
2525
* @param confidence The device confidence.
2626
* @param id The device ID.
2727
* @param lastSeen When the device was last seen.
28-
* @deprecated This constructor only exists for backward compatibility
29-
* and will be removed in the next major release.
28+
* @param localTime The local time of the device.
3029
*/
31-
public Device(
32-
Double confidence,
33-
UUID id,
34-
String lastSeen
35-
) {
36-
this(confidence, id, lastSeen, null);
37-
}
38-
3930
public Device(
4031
@JsonProperty("confidence") Double confidence,
4132
@JsonProperty("id") UUID id,

src/main/java/com/maxmind/minfraud/response/Email.java

Lines changed: 7 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ public final class Email extends AbstractModel {
1616
private final String firstSeen;
1717
private final EmailDomain domain;
1818

19+
/**
20+
* @param domain The {@code EmailDomain} model object.
21+
* @param isDisposable Whether it is a disposable email.
22+
* @param isFree Whether it is a free email.
23+
* @param isHighRisk Whether it is a high risk email.
24+
* @param firstSeen When the email was first seen.
25+
*/
1926
public Email(
2027
@JsonProperty("domain") EmailDomain domain,
2128
@JsonProperty("is_disposable") Boolean isDisposable,
@@ -30,51 +37,6 @@ public Email(
3037
this.firstSeen = firstSeen;
3138
}
3239

33-
/**
34-
* @param isDisposable Whether it is a disposable email.
35-
* @param isFree Whether it is a free email.
36-
* @param isHighRisk Whether it is a high risk email.
37-
* @param firstSeen When the email was first seen.
38-
* @deprecated This constructor only exists for backward compatibility
39-
* and will be removed in the next major release.
40-
*/
41-
public Email(
42-
Boolean isDisposable,
43-
Boolean isFree,
44-
Boolean isHighRisk,
45-
String firstSeen
46-
) {
47-
this(null, isDisposable, isFree, isHighRisk, firstSeen);
48-
}
49-
50-
/**
51-
* @param isFree Whether it is a free email.
52-
* @param isHighRisk Whether it is a high risk email.
53-
* @param firstSeen When the email was first seen.
54-
* @deprecated This constructor only exists for backward compatibility
55-
* and will be removed in the next major release.
56-
*/
57-
public Email(
58-
Boolean isFree,
59-
Boolean isHighRisk,
60-
String firstSeen
61-
) {
62-
this(null, isFree, isHighRisk, firstSeen);
63-
}
64-
65-
/**
66-
* @param isFree Whether it is a free email.
67-
* @param isHighRisk Whether it is a high risk email.
68-
* @deprecated This constructor only exists for backward compatibility
69-
* and will be removed in the next major release.
70-
*/
71-
public Email(
72-
Boolean isFree,
73-
Boolean isHighRisk
74-
) {
75-
this(null, isFree, isHighRisk, null);
76-
}
77-
7840
public Email() {
7941
this(null, null, null);
8042
}

src/main/java/com/maxmind/minfraud/response/FactorsResponse.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
*/
1111
public final class FactorsResponse extends InsightsResponse {
1212

13-
1413
private final Subscores subscores;
1514

1615
public FactorsResponse(

src/main/java/com/maxmind/minfraud/response/GeoIp2Country.java

Lines changed: 0 additions & 65 deletions
This file was deleted.

src/main/java/com/maxmind/minfraud/response/IpAddress.java

Lines changed: 16 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,28 @@
1212
* This class contains minFraud response data related to the IP location
1313
*/
1414
public final class IpAddress extends InsightsResponse implements IpAddressInterface {
15-
private final GeoIp2Country country;
1615
private final GeoIp2Location location;
1716
private final Double risk;
1817
private final List<IpRiskReason> riskReasons;
1918

19+
/**
20+
* @param city The city information.
21+
* @param continent The continent information.
22+
* @param country The country information.
23+
* @param location The location information.
24+
* @param maxmind MaxMind-specific information.
25+
* @param postal The postal information.
26+
* @param registeredCountry The information about the country where the IP was registered.
27+
* @param representedCountry The represented country, e.g., for military bases in other countries.
28+
* @param risk The IP risk.
29+
* @param riskReasons The reasons for the IP risk.
30+
* @param subdivisions The list of subdivisions.
31+
* @param traits Information about various other IP traits.
32+
*/
2033
public IpAddress(
2134
@JsonProperty("city") City city,
2235
@JsonProperty("continent") Continent continent,
23-
@JsonProperty("country") GeoIp2Country country,
36+
@JsonProperty("country") Country country,
2437
@JsonProperty("location") GeoIp2Location location,
2538
@JsonProperty("maxmind") MaxMind maxmind,
2639
@JsonProperty("postal") Postal postal,
@@ -32,56 +45,13 @@ public IpAddress(
3245
@JsonProperty("traits") Traits traits
3346
) {
3447
super(city, continent, country, location, maxmind, postal, registeredCountry, representedCountry, subdivisions, traits);
35-
this.country = country == null ? new GeoIp2Country() : country;
3648
this.location = location == null ? new GeoIp2Location() : location;
3749
this.risk = risk;
3850
this.riskReasons = Collections.unmodifiableList(riskReasons == null ? new ArrayList<>() : riskReasons);
3951
}
4052

41-
/**
42-
* @param city The city information.
43-
* @param continent The continent information.
44-
* @param country The country information.
45-
* @param location The location information.
46-
* @param maxmind MaxMind-specific information.
47-
* @param postal The postal information.
48-
* @param registeredCountry The information about the country where the IP was registered.
49-
* @param representedCountry The represented country, e.g., for military bases in other countries.
50-
* @param risk The IP risk.
51-
* @param subdivisions The list of subdivisions.
52-
* @param traits Information about various other IP traits.
53-
* @deprecated This constructor only exists for backward compatibility
54-
* and will be removed in the next major release.
55-
*/
56-
public IpAddress(
57-
City city,
58-
Continent continent,
59-
GeoIp2Country country,
60-
GeoIp2Location location,
61-
MaxMind maxmind,
62-
Postal postal,
63-
Country registeredCountry,
64-
RepresentedCountry representedCountry,
65-
Double risk,
66-
List<Subdivision> subdivisions,
67-
Traits traits
68-
) {
69-
this(city, continent, country, location, maxmind, postal, registeredCountry, representedCountry,
70-
risk, null, subdivisions, traits);
71-
}
72-
7353
public IpAddress() {
74-
this(null, null, null, null, null, null, null, null, null, null, null);
75-
}
76-
77-
/**
78-
* @return Country record for the requested IP address. This object
79-
* represents the country where MaxMind believes the end user is
80-
* located.
81-
*/
82-
@Override
83-
public GeoIp2Country getCountry() {
84-
return country;
54+
this(null, null, null, null, null, null, null, null, null, null, null, null);
8555
}
8656

8757
/**

0 commit comments

Comments
 (0)