Record Class GeoIp2Location
java.lang.Object
java.lang.Record
com.maxmind.minfraud.response.GeoIp2Location
- Record Components:
accuracyRadius- The approximate accuracy radius in kilometers around the latitude and longitude for the geographical entity (country, subdivision, city or postal code) associated with the IP address.averageIncome- The average income in US dollars associated with the requested IP address.latitude- The approximate latitude of the location associated with the IP address.localTime- The date and time of the transaction in the time zone associated with the IP address. The value is formatted according to RFC 3339. For instance, the local time in Boston might be returned as "2015-04-27T19:17:24-04:00".longitude- The approximate longitude of the location associated with the IP address.metroCode- The metro code of the location if the location is in the US.populationDensity- The estimated population per square kilometer associated with the IP address.timeZone- The time zone associated with location, as specified by the IANA Time Zone Database.
- All Implemented Interfaces:
JsonSerializable
public record GeoIp2Location(Integer accuracyRadius, Integer averageIncome, Double latitude, String localTime, Double longitude, Integer metroCode, Integer populationDensity, String timeZone)
extends Record
implements JsonSerializable
This class contains minFraud response data related to the GeoIP2 Insights location.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an instance ofGeoIp2Locationwith no data.GeoIp2Location(Integer accuracyRadius, Integer averageIncome, Double latitude, String localTime, Double longitude, Integer metroCode, Integer populationDensity, String timeZone) Creates an instance of aGeoIp2Locationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccuracyRadiusrecord component.Returns the value of theaverageIncomerecord component.final booleanIndicates whether some other object is "equal to" this one.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.UseaverageIncome()instead.Deprecated, for removal: This API element is subject to removal in a future version.Uselatitude()instead.Deprecated, for removal: This API element is subject to removal in a future version.UselocalTime()instead.Deprecated, for removal: This API element is subject to removal in a future version.Uselongitude()instead.Deprecated, for removal: This API element is subject to removal in a future version.UsemetroCode()instead.Deprecated, for removal: This API element is subject to removal in a future version.UsepopulationDensity()instead.Deprecated, for removal: This API element is subject to removal in a future version.UsetimeZone()instead.final inthashCode()Returns a hash code value for this object.latitude()Returns the value of thelatituderecord component.Returns the value of thelocalTimerecord component.Returns the value of thelongituderecord component.Returns the value of themetroCoderecord component.Returns the value of thepopulationDensityrecord component.timeZone()Returns the value of thetimeZonerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface JsonSerializable
toJson
-
Constructor Details
-
GeoIp2Location
public GeoIp2Location()Constructs an instance ofGeoIp2Locationwith no data. -
GeoIp2Location
public GeoIp2Location(Integer accuracyRadius, Integer averageIncome, Double latitude, String localTime, Double longitude, Integer metroCode, Integer populationDensity, String timeZone) Creates an instance of aGeoIp2Locationrecord class.- Parameters:
accuracyRadius- the value for theaccuracyRadiusrecord componentaverageIncome- the value for theaverageIncomerecord componentlatitude- the value for thelatituderecord componentlocalTime- the value for thelocalTimerecord componentlongitude- the value for thelongituderecord componentmetroCode- the value for themetroCoderecord componentpopulationDensity- the value for thepopulationDensityrecord componenttimeZone- the value for thetimeZonerecord component
-
-
Method Details
-
getAccuracyRadius
Deprecated, for removal: This API element is subject to removal in a future version.UseaccuracyRadius()instead. This method will be removed in 5.0.0.- Returns:
- The approximate accuracy radius in kilometers around the latitude and longitude for the geographical entity (country, subdivision, city or postal code) associated with the IP address.
-
getAverageIncome
Deprecated, for removal: This API element is subject to removal in a future version.UseaverageIncome()instead. This method will be removed in 5.0.0.- Returns:
- The average income in US dollars associated with the requested IP address.
-
getLatitude
Deprecated, for removal: This API element is subject to removal in a future version.Uselatitude()instead. This method will be removed in 5.0.0.- Returns:
- The approximate latitude of the location associated with the IP address.
-
getLongitude
Deprecated, for removal: This API element is subject to removal in a future version.Uselongitude()instead. This method will be removed in 5.0.0.- Returns:
- The approximate longitude of the location associated with the IP address.
-
getMetroCode
Deprecated, for removal: This API element is subject to removal in a future version.UsemetroCode()instead. This method will be removed in 5.0.0.- Returns:
- The metro code of the location if the location is in the US.
-
getPopulationDensity
Deprecated, for removal: This API element is subject to removal in a future version.UsepopulationDensity()instead. This method will be removed in 5.0.0.- Returns:
- The estimated population per square kilometer associated with the IP address.
-
getTimeZone
Deprecated, for removal: This API element is subject to removal in a future version.UsetimeZone()instead. This method will be removed in 5.0.0.- Returns:
- The time zone associated with location, as specified by the IANA Time Zone Database.
-
getLocalTime
Deprecated, for removal: This API element is subject to removal in a future version.UselocalTime()instead. This method will be removed in 5.0.0.- Returns:
- The date and time of the transaction in the time zone associated with the IP address. The value is formatted according to RFC 3339. For instance, the local time in Boston might be returned as "2015-04-27T19:17:24-04:00".
-
getLocalDateTime
- Returns:
- The date and time of the transaction in the time zone associated with the IP address
as a
ZonedDateTime.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
accuracyRadius
Returns the value of theaccuracyRadiusrecord component.- Returns:
- the value of the
accuracyRadiusrecord component
-
averageIncome
Returns the value of theaverageIncomerecord component.- Returns:
- the value of the
averageIncomerecord component
-
latitude
-
localTime
-
longitude
-
metroCode
-
populationDensity
Returns the value of thepopulationDensityrecord component.- Returns:
- the value of the
populationDensityrecord component
-
timeZone
-
accuracyRadius()instead.