Skip to content

Commit

Permalink
made active_only an optional parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanstapel committed Feb 2, 2024
1 parent 627aaa1 commit 4c9f227
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion BrickOwlSharp.Client/BrickOwlClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,12 @@ public async Task<List<Inventory>> GetInventoryAsync(
var url = new Uri(_baseUri, $"inventory/list").ToString();

url = AppendOptionalParam(url, "filter", filter);
url = AppendOptionalParam(url, "active_only", activeOnly);

if (activeOnly.HasValue)
{
url = AppendOptionalParam(url, "active_only", activeOnly.Value == true ? 1 : 0);
}

url = AppendOptionalParam(url, "external_id_1", externalId);
url = AppendOptionalParam(url, "lot_id", lotId);

Expand Down

0 comments on commit 4c9f227

Please sign in to comment.