From 4c9f22795eab4abbdb7e023a473c08311e7c61e0 Mon Sep 17 00:00:00 2001 From: Stephan Date: Fri, 2 Feb 2024 13:13:41 +0100 Subject: [PATCH] made active_only an optional parameter --- BrickOwlSharp.Client/BrickOwlClient.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BrickOwlSharp.Client/BrickOwlClient.cs b/BrickOwlSharp.Client/BrickOwlClient.cs index 4c85d9c..7f34777 100644 --- a/BrickOwlSharp.Client/BrickOwlClient.cs +++ b/BrickOwlSharp.Client/BrickOwlClient.cs @@ -249,7 +249,12 @@ public async Task> 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);