Skip to content

Commit

Permalink
added external_lot_ids to inventory structure
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanstapel committed May 26, 2024
1 parent 6eb3c19 commit 36819ab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
14 changes: 8 additions & 6 deletions BrickOwlSharp.Client/IdType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
# endregion
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Text;

namespace BrickOwlSharp.Client
Expand All @@ -38,7 +39,8 @@ public enum IdType
SetNumber,
BLItemNo,
UPC,
EAN
EAN,
Other
}


Expand All @@ -56,9 +58,9 @@ public static IdType FromString(this IdType _, string s)
case "bl_item_no": return IdType.BLItemNo;
case "ean": return IdType.EAN;
case "upc": return IdType.UPC;
case "other": return IdType.Other;
default: return IdType.Unknown;
}

return IdType.Unknown;
} // !FromString()


Expand All @@ -73,10 +75,10 @@ public static string EnumToString(this IdType c)
case IdType.SetNumber: return "set_number";
case IdType.BLItemNo: return "bl_item_no";
case IdType.EAN: return "ean";
case IdType.UPC: return "upc";
case IdType.UPC:return "upc";
case IdType.Other: return "other";
default: return "";
}

return "";
} // !EnumToString()
}
}
5 changes: 4 additions & 1 deletion BrickOwlSharp.Client/Inventory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ public class Inventory
public List<TierPrice> TierPrices { get; set; }

[JsonPropertyName("ids")]
public List<Reference> Ids { get; set; } = new List<Reference>();
public List<Reference> Ids { get; set; } = new List<Reference>();

[JsonPropertyName("external_lot_ids")]
public List<Reference> ExternalLotIds { get; set; } = new List<Reference>();
}
}

0 comments on commit 36819ab

Please sign in to comment.