Class: PostcodeAnywhere::Lookup
- Inherits:
-
Object
- Object
- PostcodeAnywhere::Lookup
- Defined in:
- lib/postcode_anywhere/lookup.rb
Class Method Summary collapse
Class Method Details
.lookup(options) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/postcode_anywhere/lookup.rb', line 10 def self.lookup() results = PostcodeAnywhere.get(SERVICE_ADDRESS+"?Key=#{PostcodeAnywhere.key}&Postcode=#{CGI::escape([:postcode])}&Building=#{[:number]}") address = Address.new address.line1 = results["Table"]["Row"]["Line1"] address.company = results["Table"]["Row"]["Company"] address end |