Class AbstractCityResponse

Direct Known Subclasses:
CityResponse, EnterpriseResponse, InsightsResponse

public abstract class AbstractCityResponse extends AbstractCountryResponse
Abstract class for models that contain City data.
  • Method Details

    • getCity

      public City getCity()
      Returns:
      City record for the requested IP address.
    • getLocation

      public Location getLocation()
      Returns:
      Location record for the requested IP address.
    • getPostal

      public Postal getPostal()
      Returns:
      the postal
    • getSubdivisions

      public List<Subdivision> getSubdivisions()
      Returns:
      An List of Subdivision objects representing the country subdivisions for the requested IP address. The number and type of subdivisions varies by country, but a subdivision is typically a state, province, county, etc. Subdivisions are ordered from most general (largest) to most specific (smallest). If the response did not contain any subdivisions, this method returns an empty array.
    • getMostSpecificSubdivision

      public Subdivision getMostSpecificSubdivision()
      Returns:
      An object representing the most specific subdivision returned. If the response did not contain any subdivisions, this method returns an empty Subdivision object.
    • getLeastSpecificSubdivision

      public Subdivision getLeastSpecificSubdivision()
      Returns:
      An object representing the least specific subdivision returned. If the response did not contain any subdivisions, this method returns an empty Subdivision object.