Module: Genability::Client::ZipCode

Included in:
Genability::Client
Defined in:
lib/genability/client/zip_code.rb

Overview

Zip Code provides a set of information useful for display purposes. For example, if you are interested in tariffs for zip code 48322, you can retrieve additional information such as the city and county name as well as the latitude and longitude coordinates.

Instance Method Summary collapse

Instance Method Details

#zipcode(zipcode) ⇒ Hashie::Mash Also known as: zip_code

Returns the details for a zip code.

Examples:

Return the details for the 48322 zipcode

Genability.zipcode('48322')

Parameters:

  • zipcode (String)

    5 digit zipcode

Returns:

  • (Hashie::Mash)

    Return the details for a particular zipcode.

See Also:

Supported formats:

  • :json

Requires Authentication:

  • true

Rate Limited:

  • true



19
20
21
# File 'lib/genability/client/zip_code.rb', line 19

def zipcode(zipcode)
  get("public/zipcodes/#{zipcode}").results.first
end