From 3e442db8e07c04aafc8c52ec1e7bcd125ac9d5a8 Mon Sep 17 00:00:00 2001 From: radoslawlyson Date: Fri, 29 Sep 2023 13:07:57 +0200 Subject: [PATCH 1/3] spartans/GOLD-2347 - fix the model --- .../Dto/CreateLabelFromShipmentDetails/Params.cs | 16 +++++++++------- ShipEngine/ShipEngine.csproj | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ShipEngine/Models/Dto/CreateLabelFromShipmentDetails/Params.cs b/ShipEngine/Models/Dto/CreateLabelFromShipmentDetails/Params.cs index 01bed0d1..799b5f8a 100644 --- a/ShipEngine/Models/Dto/CreateLabelFromShipmentDetails/Params.cs +++ b/ShipEngine/Models/Dto/CreateLabelFromShipmentDetails/Params.cs @@ -32,36 +32,38 @@ public class Params /// The label charge event. /// [JsonConverter(typeof(StringEnumConverter))] - public ChargeEvent ChargeEvent { get; set; } + public ChargeEvent? ChargeEvent { get; set; } /// /// The labelId of the original (outgoing) label that the return label is for. This associates the two labels together, which is required by some carriers. /// - public string OutboundLabelId { get; set; } + #nullable enable + public string? OutboundLabelId { get; set; } + #nullable disable /// /// The possible validate address values /// [JsonConverter(typeof(StringEnumConverter))] - public ValidateAddress ValidateAddress { get; set; } + public ValidateAddress? ValidateAddress { get; set; } /// /// There are two different ways to download a label: /// [JsonConverter(typeof(StringEnumConverter))] - public LabelDownloadType LabelDownloadType { get; set; } + public LabelDownloadType? LabelDownloadType { get; set; } /// /// The file format that you want the label to be in. We recommend pdf format because it is supported by all carriers, whereas some carriers do not support the png or zpl formats. /// [JsonConverter(typeof(StringEnumConverter))] - public LabelFormat LabelFormat { get; set; } + public LabelFormat? LabelFormat { get; set; } /// /// The display format that the label should be shown in. /// [JsonConverter(typeof(StringEnumConverter))] - public DisplayScheme DisplayScheme { get; set; } + public DisplayScheme? DisplayScheme { get; set; } /// /// The layout (size) that you want the label to be in. The labelFormat determines which sizes are allowed. 4x6 is supported for all label formats, whereas letter (8.5" x 11") is only supported for pdf format. @@ -167,7 +169,7 @@ public class Shipment /// The order sources that are supported by ShipEngine /// [JsonConverter(typeof(StringEnumConverter))] - public OrderSourceCode OrderSourceCode { get; set; } + public OrderSourceCode? OrderSourceCode { get; set; } /// /// The packages in the shipment. diff --git a/ShipEngine/ShipEngine.csproj b/ShipEngine/ShipEngine.csproj index 69fcf965..dabaccd5 100644 --- a/ShipEngine/ShipEngine.csproj +++ b/ShipEngine/ShipEngine.csproj @@ -4,7 +4,7 @@ ShipEngine sdk;rest;api;shipping;rates;label;tracking;cost;address;validation;normalization;fedex;ups;usps; - 1.1.2 + 1.1.3 ShipEngine ShipEngine The official ShipEngine C# SDK for .NET From 4f2435c13371170eca02c16a2d1ddac0735c293e Mon Sep 17 00:00:00 2001 From: radoslawlyson Date: Fri, 29 Sep 2023 13:57:11 +0200 Subject: [PATCH 2/3] spartans/GOLD-2347 - update CHANGELOG --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c379f26..204c2080 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,3 +58,10 @@ The Customs Item Quantity type has been changed to integer type for CreateLabelF ### Fixed ShipmentItem.Quantity is now an int? instead of a double?. + + +## 1.1.3 + +### Fixed + +CreateLabelFromShipmentDetails parameters causing problems when unused has been made optional. \ No newline at end of file From fb1b160494983768788830a16777ae6127972cb8 Mon Sep 17 00:00:00 2001 From: radoslawlyson Date: Wed, 4 Oct 2023 08:19:39 +0200 Subject: [PATCH 3/3] Bump version after merge --- ShipEngine/ShipEngine.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ShipEngine/ShipEngine.csproj b/ShipEngine/ShipEngine.csproj index dabaccd5..b29b108e 100644 --- a/ShipEngine/ShipEngine.csproj +++ b/ShipEngine/ShipEngine.csproj @@ -4,7 +4,7 @@ ShipEngine sdk;rest;api;shipping;rates;label;tracking;cost;address;validation;normalization;fedex;ups;usps; - 1.1.3 + 1.1.4 ShipEngine ShipEngine The official ShipEngine C# SDK for .NET