Module: Usps::Api::Endpoints::ZipCodeLookup
- Included in:
- Usps::Api::Endpoints
- Defined in:
- lib/usps/api/endpoints/zip_code_lookup.rb
Instance Method Summary collapse
-
#zip_code_lookup(options = {}) ⇒ Object
The ZipCodeLookup API, which returns the ZIP Code and ZIP Code + 4 corresponding to the given address, city, and state (use USPS state abbreviations).
Instance Method Details
#zip_code_lookup(options = {}) ⇒ Object
The ZipCodeLookup API, which returns the ZIP Code and ZIP Code + 4 corresponding to the given address, city, and state (use USPS state abbreviations). The ZipCodeLookup API processes up to five lookups per request.
23 24 25 26 27 28 29 30 31 |
# File 'lib/usps/api/endpoints/zip_code_lookup.rb', line 23 def zip_code_lookup( = {}) throw ArgumentError.new('Required arguments :zip_code_lookup_request missing') if [:zip_code_lookup_request].nil? request = build_request(:zip_code_lookup, ) get('https://secure.shippingapis.com/ShippingAPI.dll', { API: 'ZipCodeLookup', XML: request, }) end |