Skip to content

Commit

Permalink
Added compatibility parameter to US Street and US Zipcode.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Amundson committed Jun 19, 2024
1 parent 465bde7 commit 0b1ee4b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sdk/USStreetApi/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ private static void PopulateQueryString(Lookup address, Request request)
request.SetParameter("addressee", address.Addressee);
request.SetParameter("urbanization", address.Urbanization);
request.SetParameter("match", address.MatchStrategy);

request.SetParameter("compatibility", address.Compatibility);

if (address.MaxCandidates != 1)
request.SetParameter("candidates", address.MaxCandidates.ToString(CultureInfo.InvariantCulture));

Expand Down
3 changes: 3 additions & 0 deletions src/sdk/USStreetApi/Lookup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public class Lookup : ILookup
[DataMember(Name = "format")]
public string OutputFormat { get; set; }

[DataMember(Name = "compatibility")]
public string Compatibility { get; set; }

public int MaxCandidates
{
get => this.maxCandidates;
Expand Down
1 change: 1 addition & 0 deletions src/sdk/USZipCodeApi/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ private static void PopulateQueryString(Lookup lookup, Request request)
request.SetParameter("city", lookup.City);
request.SetParameter("state", lookup.State);
request.SetParameter("zipcode", lookup.ZipCode);
request.SetParameter("compatibility", lookup.Compatibility);
}

private static void AssignResultsToLookups(Batch batch, IList<Result> results)
Expand Down
11 changes: 11 additions & 0 deletions src/sdk/USZipCodeApi/Lookup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ public class Lookup : ILookup
[DataMember(Name = "zipcode")]
public string ZipCode { get; set; }

[DataMember(Name = "compatibility")]
public string Compatibility { get; set; }

#endregion

#region [ Constructors ]
Expand Down Expand Up @@ -47,6 +50,14 @@ public Lookup(string city, string state, string zipcode) : this()
this.ZipCode = zipcode;
}

public Lookup(string city, string state, string zipcode, string compatibility) : this()
{
this.City = city;
this.State = state;
this.ZipCode = zipcode;
this.Compatibility = compatibility;
}

#endregion
}
}

0 comments on commit 0b1ee4b

Please sign in to comment.