Record Class ShippingAddress

java.lang.Object
java.lang.Record
com.maxmind.minfraud.response.ShippingAddress
Record Components:
distanceToBillingAddress - The distance in kilometers from the shipping address to billing address.
distanceToIpLocation - The distance in kilometers from the address to the IP location. This will be null if there is no value in the response.
isHighRisk - This returns true if the shipping address is an address associated with fraudulent transactions. It returns false when the address is not associated with increased risk. If the address could not be parsed or was not provided, null is returned.
isInIpCountry - This returns true if the address is in the IP country. It is false when the address is not in the IP country. If the address could not be parsed or was not provided or the IP address could not be geolocated, then null will be returned.
isPostalInCity - This will return true if the postal code provided with the address is in the city for the address. It will return false when the postal code is not in the city. If the address was not provided or could not be parsed, null will be returned.
latitude - The latitude associated with the address. This will be null if there is no value in the response.
longitude - The longitude associated with the address. This will be null if there is no value in the response.
All Implemented Interfaces:
JsonSerializable

public record ShippingAddress(Integer distanceToBillingAddress, Integer distanceToIpLocation, Boolean isHighRisk, Boolean isInIpCountry, Boolean isPostalInCity, Double latitude, Double longitude) extends Record implements JsonSerializable
This class contains minFraud response data related to the shipping address.
  • Constructor Details

    • ShippingAddress

      public ShippingAddress()
      Constructs an instance of ShippingAddress with no data.
    • ShippingAddress

      public ShippingAddress(Integer distanceToBillingAddress, Integer distanceToIpLocation, Boolean isHighRisk, Boolean isInIpCountry, Boolean isPostalInCity, Double latitude, Double longitude)
      Creates an instance of a ShippingAddress record class.
      Parameters:
      distanceToBillingAddress - the value for the distanceToBillingAddress record component
      distanceToIpLocation - the value for the distanceToIpLocation record component
      isHighRisk - the value for the isHighRisk record component
      isInIpCountry - the value for the isInIpCountry record component
      isPostalInCity - the value for the isPostalInCity record component
      latitude - the value for the latitude record component
      longitude - the value for the longitude record component
  • Method Details

    • getDistanceToBillingAddress

      @Deprecated(since="4.0.0", forRemoval=true) public Integer getDistanceToBillingAddress()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use distanceToBillingAddress() instead. This method will be removed in 5.0.0.
      Returns:
      The distance in kilometers from the shipping address to billing address.
    • getLatitude

      @Deprecated(since="4.0.0", forRemoval=true) public Double getLatitude()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use latitude() instead. This method will be removed in 5.0.0.
      Returns:
      The latitude associated with the address.
    • getLongitude

      @Deprecated(since="4.0.0", forRemoval=true) public Double getLongitude()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use longitude() instead. This method will be removed in 5.0.0.
      Returns:
      The longitude associated with the address.
    • getDistanceToIpLocation

      @Deprecated(since="4.0.0", forRemoval=true) public Integer getDistanceToIpLocation()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use distanceToIpLocation() instead. This method will be removed in 5.0.0.
      Returns:
      The distance in kilometers from the address to the IP location.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • distanceToBillingAddress

      public Integer distanceToBillingAddress()
      Returns the value of the distanceToBillingAddress record component.
      Returns:
      the value of the distanceToBillingAddress record component
    • distanceToIpLocation

      public Integer distanceToIpLocation()
      Returns the value of the distanceToIpLocation record component.
      Returns:
      the value of the distanceToIpLocation record component
    • isHighRisk

      public Boolean isHighRisk()
      Returns the value of the isHighRisk record component.
      Returns:
      the value of the isHighRisk record component
    • isInIpCountry

      public Boolean isInIpCountry()
      Returns the value of the isInIpCountry record component.
      Returns:
      the value of the isInIpCountry record component
    • isPostalInCity

      public Boolean isPostalInCity()
      Returns the value of the isPostalInCity record component.
      Returns:
      the value of the isPostalInCity record component
    • latitude

      public Double latitude()
      Returns the value of the latitude record component.
      Returns:
      the value of the latitude record component
    • longitude

      public Double longitude()
      Returns the value of the longitude record component.
      Returns:
      the value of the longitude record component