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

Different names for equivalent methods on US Street Client and International Street Client #31

Closed lidimayra closed 1 year ago

lidimayra commented 2 years ago

Both US Street Client and International Street Client are very similar when it comes to usage. I thought it was a bit confusing that both of them provide a method aimed to send lookup, however the first one defines it as send_lookup(lookup) while the other one defines it as send(lookup).

https://github.com/smartystreets/smartystreets-ruby-sdk/blob/bb101606189004725cf56aef77b592eecdc0aaf3/lib/smartystreets_ruby_sdk/us_street/client.rb#L15

https://github.com/smartystreets/smartystreets-ruby-sdk/blob/bb101606189004725cf56aef77b592eecdc0aaf3/lib/smartystreets_ruby_sdk/international_street/client.rb#L14

Specially when it comes to the international street client, it also feels weird to call client.send(lookup). For someone who's not familiar with the gem, by doing it like this, it gives the impression that we're trying to call a private method name lookup (using the native Object#send) and forgot to use the : to specify lookup as symbol

Would it make sense to rename it to send_lookup, to avoid confusion in both scenarios? If positive, I would be happy to help with this change.

abbeynels commented 1 year ago

This issue has been resolved in commit https://github.com/smartystreets/smartystreets-ruby-sdk/commit/1d9960e126637d7dd2e94d0b894aeb9623c76cec. Thank you for letting us know of this issue.