lib/friendly_shipping/services/usps.rb
# Find city and state for a given ZIP code
# @param [Physical::Location] location A location object with country and ZIP code set
# @return [Result<ApiResult<Array<Physical::Location>>>] The response data from USPS encoded in a
#   `Physical::Location` object. Country, City and ZIP code will be set, everything else nil.
Find city and state for a given ZIP code
Find city and state for a given ZIP code
def city_state_lookup(location, debug: false)
        city_state_lookup_request_xml = SerializeCityStateLookupRequest.call(location: location, login: login)
        request = build_request(api: :city_state_lookup, xml: city_state_lookup_request_xml, debug: debug)
        client.post(request).bind do |response|
          ParseCityStateLookupResponse.call(response: response, request: request)
        end
      end
def city_state_lookup ( location , debug : false ) city_state_lookup_request_xml = SerializeCityStateLookupRequest . call ( location : location , login : login ) request = build_request ( api : :city_state_lookup , xml : city_state_lookup_request_xml , debug : debug ) client . post ( request ) . bind do | response | ParseCityStateLookupResponse . call ( response : response , request : request ) end end
Find city and state for a given ZIP code
Find city and state for a given ZIP code
The response data from USPS encoded in a `Physical::Location` object. Country, City and ZIP code will be set, everything else nil.
The response data from USPS encoded in a ` Physical :: Location ` object . Country City and ZIP code will be set everything else nil .
Result<ApiResult<Array<Physical::Location>>>
location
<not_specific>
debug
<not_specific>
<not_specific>
location A location object with country and ZIP code set
location A location object with country and ZIP code set