lib/usps/api/endpoints/zip_code_lookup.rb in usps-ruby-client-0.1.0 vs lib/usps/api/endpoints/zip_code_lookup.rb in usps-ruby-client-0.1.1

- old
+ new

@@ -4,38 +4,24 @@ module Usps module Api module Endpoints module ZipCodeLookup - # - # ZIP Code Lookup API - # # 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. - # - # @option option [(Alias)] :ZipCodeLookupRequest (Required) - # - API = ZipCodeLookupRequest - # @option option [(Group)] :Address (Optional) - # @option option [String] :FirmName (Optional) - # - Up to 5 address verifications can be included per transaction. - # @option option [String] :Address1 (Optional) - # - Delivery Address in the destination address. May contain secondary unit designator, such as APT or SUITE, for Accountable mail.) - # @option option [String] :Address2 (Required) - # - Delivery Address in the destination address. Required for all mail and packages, however 11-digit Destination Delivery Point ZIP+4 Code can be provided as an alternative in the Detail 1 Record. - # @option option [String] :City (Optional) - # - City name of the destination address. Field is required, unless a verified 11-digit DPV is provided for the mail piece. - # @option option [String] :State (Optional) - # - Two-character state code of the destination address. - # @option option [String] :Zip5 (Optional) - # - Destination 5-digit ZIP Code. Must be 5-digits. Numeric values (0-9) only. If International, all zeroes. - # @option option [String] :Zip4 (Optional) - # - Destination ZIP+4. Numeric values (0-9) only. If International, all zeroes. Default to spaces if not available. - - # - # @see - def zip_code_lookup(options = {}) + # @param [Hash] options + # @option options [required, Hash] zip_code_lookup_request API = ZipCodeLookupRequest + # * *:address* (Hash) — + # * *:firm_name* (String) — Up to 5 address verifications can be included per transaction. + # * *:address1* (String) — Delivery Address in the destination address. May contain secondary unit designator, such as APT or SUITE, for Accountable mail.) + # * *:address2* (required, String) — Delivery Address in the destination address. Required for all mail and packages, however 11-digit Destination Delivery Point ZIP+4 Code can be provided as an alternative in the Detail 1 Record. + # * *:city* (String) — City name of the destination address. Field is required, unless a verified 11-digit DPV is provided for the mail piece. + # * *:state* (String) — Two-character state code of the destination address. + # * *:zip5* (String) — Destination 5-digit ZIP Code. Must be 5-digits. Numeric values (0-9) only. If International, all zeroes. + # * *:zip4* (String) — Destination ZIP+4. Numeric values (0-9) only. If International, all zeroes. Default to spaces if not available. +def zip_code_lookup(options = {}) throw ArgumentError.new('Required arguments :zip_code_lookup_request missing') if options[:zip_code_lookup_request].nil? request = build_request(:zip_code_lookup, options) get('https://secure.shippingapis.com/ShippingAPI.dll', { API: 'ZipCodeLookup',