class Geocoder::Result::Ipbase

def city

def city
  @data["data"]["location"]["city"]["name"]
end

def coordinates

def coordinates
  [
    @data["data"]["location"]["latitude"].to_f,
    @data["data"]["location"]["longitude"].to_f
  ]
end

def country

def country
  @data["data"]["location"]["country"]["name"]
end

def country_code

def country_code
  @data["data"]["location"]["country"]["alpha2"]
end

def ip

def ip
  @data["data"]['ip']
end

def postal_code

def postal_code
  @data["data"]["location"]["zip"]
end

def state

def state
  @data["data"]["location"]["region"]["name"]
end

def state_code

def state_code
  @data["data"]["location"]["region"]["alpha2"]
end