11use smarty_rust_sdk:: sdk:: authentication:: SecretKeyCredential ;
22use smarty_rust_sdk:: sdk:: options:: OptionsBuilder ;
3- use smarty_rust_sdk:: us_enrichment_api:: client:: USEnrichmentClient ;
3+
4+ use smarty_rust_sdk:: us_enrichment_api:: client:: * ;
5+ use smarty_rust_sdk:: us_enrichment_api:: financial:: * ;
6+ use smarty_rust_sdk:: us_enrichment_api:: geo:: * ;
7+ use smarty_rust_sdk:: us_enrichment_api:: principal:: * ;
8+
49use smarty_rust_sdk:: us_enrichment_api:: lookup:: EnrichmentLookup ;
5- use smarty_rust_sdk:: us_enrichment_api:: results:: {
6- EnrichmentResponse , FinancialResponse , PrincipalResponse ,
7- } ;
10+ use smarty_rust_sdk:: us_enrichment_api:: response:: EnrichmentResponse ;
11+ use smarty_rust_sdk:: us_enrichment_api:: secondary:: SecondaryCountResponse ;
12+ use smarty_rust_sdk:: us_enrichment_api:: secondary:: SecondaryResponse ;
13+ use smarty_rust_sdk:: us_enrichment_api:: risk:: RiskResponse ;
14+
815use std:: error:: Error ;
916
1017#[ tokio:: main]
@@ -13,23 +20,29 @@ async fn main() -> Result<(), Box<dyn Error>> {
1320
1421 lookup :: < FinancialResponse > ( key) . await ?;
1522 lookup :: < PrincipalResponse > ( key) . await ?;
23+ lookup :: < GeoReferenceResponse > ( key) . await ?;
24+ lookup :: < GeoReference2010Response > ( key) . await ?;
25+ lookup :: < GeoReference2020Response > ( key) . await ?;
26+ lookup :: < SecondaryResponse > ( key) . await ?;
27+ lookup :: < SecondaryCountResponse > ( key) . await ?;
28+ lookup :: < RiskResponse > ( key) . await ?;
1629
1730 Ok ( ( ) )
1831}
1932
2033async fn lookup < R : EnrichmentResponse > ( key : u32 ) -> Result < ( ) , Box < dyn Error > > {
21- let mut lookup = EnrichmentLookup :: < R > :: new ( key) ;
34+ let mut lookup = EnrichmentLookup :: < R > {
35+ smarty_key : key,
36+ etag : "" . to_string ( ) ,
37+ ..Default :: default ( )
38+ } ;
2239
2340 let authentication = SecretKeyCredential :: new (
2441 std:: env:: var ( "SMARTY_AUTH_ID" ) . expect ( "Missing SMARTY_AUTH_ID env variable" ) ,
2542 std:: env:: var ( "SMARTY_AUTH_TOKEN" ) . expect ( "Missing SMARTY_AUTH_TOKEN env variable" ) ,
2643 ) ;
2744
2845 let options = OptionsBuilder :: new ( Some ( authentication) )
29- // The appropriate license values to be used for your subscriptions
30- // can be found on the Subscriptions page of the account dashboard.
31- // https://www.smartystreets.com/docs/cloud/licensing
32- . with_license ( & format ! ( "us-property-data-{}-cloud" , R :: lookup_type( ) ) )
3346 . with_logging ( )
3447 . build ( ) ;
3548
0 commit comments