code: public static base_response add(nitro_service client, location resource) throws Exception {
  		location addresource = new location();
  		addresource.ipfrom = resource.ipfrom;
  		addresource.ipto = resource.ipto;
  		addresource.preferredlocation = resource.preferredlocation;
  		addresource.longitude = resource.longitude;
  		addresource.latitude = resource.latitude;
  		return addresource.add_resource(client);
  	}
docs: Use this API to add location.