Giter Club home page Giter Club logo

smarty-rust-sdk's People

Contributors

andrewjohnsonsmarty avatar ryanlcox1 avatar theemeraldbee avatar

Watchers

 avatar  avatar

Forkers

theemeraldbee

smarty-rust-sdk's Issues

Update International Autocomplete to v2

Update the International-Autocomplete-API portion of the SDK for the v2 of international-autocomplete-api.

The new behavior is as follows:

A normal query with search will return a list of results, each containing entries , address_text , and address_id .

A query with an address_id that has more than 1 entries , will again return a list of results, each containing entries , address_text , and address_id

A query with an address_id field set to an address with exactly 1 entry will return more detailed information about that specific address ( street , locality , administrative_area , postal_code , country_iso3 ).

A full breakdown of the changes required:

  • Change default endpoint of international-autocomplete-api to: "https://international-autocomplete.api.smarty.com/v2/lookup"
  • Remove super-administrative-area and sub-administrative-area fields from Candidate
  • Add entries (int) , address_text (string), and address_id (string) fields to Candidate
    • When constructing a request , address_id needs to be added directly to the url path, not added as a query parameter. Ex: (if address_id =`12345`, url should be https://service.com/v2/lookup/12345?auth_id=. . . , not https://service.com/v2/lookup?address_id=12345&auth_id=. . . . This is new behavior, and will probably require changes in other locations like URLPrefixSender . See other SDKs as an example.
  • Remove distance , geolocation , include_only_administrative_area , latitude , and longitude fields from Lookup
  • Remove international_geolocate_type
  • In international_autocomplete/client send() function, add check to ensure i) country field on lookup is set and ii) search || address_id field is set
  • Update unit tests to cover behavior above

For Reference, take a look at any of the other SDKs, under the iac-v2 branch:)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.