autoconfigure-smartystreets
This library provides provides smarty streets autocompletion and us address validation client.
How to use in client project ?
repositories {
maven {
url 'https://gitlab.com/api/v4/projects/39953646/packages/maven'
}
mavenCentral()
}
dependencies {
// import BOM
implementation(platform("uiowa.springboot:autoconfigure:1.0.0"))
implementation ("uiowa.springboot:autoconfigure-smartystreets")
}Using SmartyStreets service
This service internally use smarty streets client and provides 2 methods one for address autocompletion and other for us address validation.
@Autowired
private SmartyStreetsService smartyStreetsService;
Candidate candidate = smartyStreetsService.validateUsAddress(String addressee, String street1, String street2, String secondary, String urbanization, String city, String state, String zipcode);
Suggestion[] suggestions = smartyStreetsService.suggest(String query, Map<SmartyLookup, String> filters);
//valid SmartyLookup values: STATE,CITY,MAX_RESULTIf you want to get underlying smartystreet client
//To use address autocompletion client
@Autowired
private com.smartystreets.api.us_autocomplete_pro.Client addressSuggestClient;
//To use us address validation client
@Autowired
private com.smartystreets.api.us_street.Client addressValidationClient;