Sha256: 8e9c9546389a11ba60aa1cd0b3d52b17cc3043c6d57c8a6708c5949108d7e7f0
Contents?: true
Size: 1.87 KB
Versions: 1
Compression:
Stored size: 1.87 KB
Contents
require 'rest-client' require 'nokogiri' require 'json' module MelissaData module WebSmart class PropertyAPI def property_by_apn(fips:, apn:) resp = RestClient.get('https://property.melissadata.net/v3/REST/Service.svc/doLookup', { params: { id: MelissaData.web_smart_id, fips: fips, apn: apn, OptPropertyDetail: "1" } }) PropertyXMLParser.new(Nokogiri::XML(resp)).parse end def property_by_address_key(address_key:) resp = RestClient.get('https://property.melissadata.net/v3/REST/Service.svc/doLookup', { params: { id: MelissaData.web_smart_id, AddressKey: address_key, OptPropertyDetail: "1" } }) PropertyXMLParser.new(Nokogiri::XML(resp)).parse end def address(address:, city:, state:, zip:, country:) resp = JSON.parse(RestClient.get("https://personator.melissadata.net/v3/WEB/ContactVerify/doContactVerify", { params: { id: MelissaData.web_smart_id, Actions: "Check", a1: address, city: city, state: state, postal: zip, ctry: country, AdvancedAddressCorrection: "on",}, accept: :json, content_type: :json })) resp["Records"].first end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
melissa_data-0.2.6 | lib/melissa_data/web_smart/property_api.rb |