smartystreets / smartystreets-dotnet-sdk

The official client libraries for accessing SmartyStreets APIs from .Net (C# and CLR-based languages)
https://smartystreets.com/docs/sdk/dotnet
Apache License 2.0
22 stars 20 forks source link

Match Strategy Missing? #2

Closed ForteUnited closed 7 years ago

ForteUnited commented 7 years ago

I've taken a look at the current client and lookup objects for the US Street Address API and I can't seem to find anything to lines up with the Match Strategy parameter in the API documentation. Am I missing something?

mdwhatcott commented 7 years ago

You are correct, it is currently missing. we plan to add it.

mdwhatcott commented 7 years ago

C# SDK: add Lookup.Match field

ForteUnited commented 7 years ago

Ok. I haven't gone and looked at the source but can I assume that it is using the default Match Strategy of "strict"?

mdwhatcott commented 7 years ago

Yes, when no match strategy is specified the default strategy is "strict".

Jmaur commented 7 years ago

@mdwhatcott this issue still hasn't been fixed.

mdwhatcott commented 7 years ago

@Jmaur - Actually, it has!

The MatchStrategy field has already been added to the Lookup:

https://github.com/smartystreets/smartystreets-dotnet-sdk/blob/master/src/sdk/USStreetApi/Lookup.cs#L51

It has three possible values:

https://github.com/smartystreets/smartystreets-dotnet-sdk/blob/master/src/sdk/USStreetApi/Lookup.cs#L12

Jmaur commented 7 years ago

@mdwhatcott it was added to the Lookup class but it was not added to the PopulateQueryString method of the Client.cs class which maps the address fields to the request parameters. Need to include: request.SetParameter("match", address.MatchStrategy);

In: https://github.com/smartystreets/smartystreets-dotnet-sdk/blob/master/src/sdk/USStreetApi/Client.cs#L68

mdwhatcott commented 7 years ago

Should be fixed with 79c6b069e054b7052d4fd185acf701403f91c69c

Thanks for your help @Jmaur

Jmaur commented 7 years ago

No problem @mdwhatcott glad to help, do you know when the nuget package will be updated?

mdwhatcott commented 7 years ago

Probably sometime in the next few days.