smartystreets / smartystreets-ruby-sdk

The official client libraries for accessing SmartyStreets APIs from Ruby
https://smartystreets.com/docs/sdk/ruby
Apache License 2.0
23 stars 25 forks source link

prefer_geolocation does not work with us autocomplete pro #50

Closed musa-raza closed 4 months ago

musa-raza commented 4 months ago

When building the request in the Client for autocomplete, the prefer_geolocation is always set to none because the if/else conditional is always returning true :

if lookup.prefer_zip_codes or lookup.zip_filter

Both prefer_zip_coes and zip_filter are empty arrays (the check should be for presence, I have used Array#any in my changes), so it is setting the prefer_geolocation to none. I have a pull request that links to this issue!