Record Class Phone

java.lang.Object
java.lang.Record
com.maxmind.minfraud.response.Phone
Record Components:
country - The two-character ISO 3166-1 country code for the country associated with the phone number.
isVoip - Whether the number is VoIP.
matchesPostal - Whether the phone number matches the postal code.
networkOperator - The name of the original network operator associated with the phone number. This field does not reflect phone numbers that have been ported from the original operator to another, nor does it identify mobile virtual network operators.
numberType - One of the following values: fixed or mobile. Additional values may be added in the future.
All Implemented Interfaces:
JsonSerializable

public record Phone(String country, Boolean isVoip, Boolean matchesPostal, String networkOperator, String numberType) extends Record implements JsonSerializable
This class contains minFraud response data related to the phone number.
  • Constructor Details

    • Phone

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

      public Phone(String country, Boolean isVoip, Boolean matchesPostal, String networkOperator, String numberType)
      Creates an instance of a Phone record class.
      Parameters:
      country - the value for the country record component
      isVoip - the value for the isVoip record component
      matchesPostal - the value for the matchesPostal record component
      networkOperator - the value for the networkOperator record component
      numberType - the value for the numberType record component
  • Method Details

    • getCountry

      @Deprecated(since="4.0.0", forRemoval=true) public String getCountry()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use country() instead. This method will be removed in 5.0.0.
      Returns:
      The two-character ISO 3166-1 country code for the country associated with the phone number.
    • getNetworkOperator

      @Deprecated(since="4.0.0", forRemoval=true) public String getNetworkOperator()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use networkOperator() instead. This method will be removed in 5.0.0.
      Returns:
      The name of the original network operator associated with the phone number. This field does not reflect phone numbers that have been ported from the original operator to another, nor does it identify mobile virtual network operators.
    • getNumberType

      @Deprecated(since="4.0.0", forRemoval=true) public String getNumberType()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use numberType() instead. This method will be removed in 5.0.0.
      Returns:
      One of the following values: fixed or mobile. Additional values may be added in the future.
    • 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.
    • country

      public String country()
      Returns the value of the country record component.
      Returns:
      the value of the country record component
    • isVoip

      public Boolean isVoip()
      Returns the value of the isVoip record component.
      Returns:
      the value of the isVoip record component
    • matchesPostal

      public Boolean matchesPostal()
      Returns the value of the matchesPostal record component.
      Returns:
      the value of the matchesPostal record component
    • networkOperator

      public String networkOperator()
      Returns the value of the networkOperator record component.
      Returns:
      the value of the networkOperator record component
    • numberType

      public String numberType()
      Returns the value of the numberType record component.
      Returns:
      the value of the numberType record component