diff --git a/CHANGELOG.md b/CHANGELOG.md index c1e7b5e1..34a17b36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -109,4 +109,10 @@ Added custom converter to fallback to default unspecified error code if value ca ### Changed -Updated to .NET 8.0, removed Newtonsoft.Json dependency, and updated to System.Text.Json \ No newline at end of file +Updated to .NET 8.0, removed Newtonsoft.Json dependency, and updated to System.Text.Json + +## 2.0.1 + +### Changed + +Updated references to use proper converter to resolve enum string values \ No newline at end of file diff --git a/ShipEngine/Models/Dto/Common/Address.cs b/ShipEngine/Models/Dto/Common/Address.cs index 8a5ef858..fa9b3dbc 100644 --- a/ShipEngine/Models/Dto/Common/Address.cs +++ b/ShipEngine/Models/Dto/Common/Address.cs @@ -62,7 +62,7 @@ public class Address /// /// Indicates whether the address is residential or commercial, if known. /// - [JsonConverter(typeof(JsonStringEnumConverter))] + [JsonConverter(typeof(JsonStringEnumMemberConverter))] public AddressResidentialIndicator? AddressResidentialIndicator { get; set; } } } \ No newline at end of file diff --git a/ShipEngine/Models/Dto/Common/AdvancedShipmentOptions.cs b/ShipEngine/Models/Dto/Common/AdvancedShipmentOptions.cs index 528eb010..8f931f91 100644 --- a/ShipEngine/Models/Dto/Common/AdvancedShipmentOptions.cs +++ b/ShipEngine/Models/Dto/Common/AdvancedShipmentOptions.cs @@ -23,7 +23,7 @@ public class AdvancedShipmentOptions /// Indicates whether to bill shipping costs to the recipient or to a third-party. /// When billing to a third-party, the bill_to_account, bill_to_country_code, and bill_to_postal_code fields must also be set. /// - [JsonConverter(typeof(JsonStringEnumConverter))] + [JsonConverter(typeof(JsonStringEnumMemberConverter))] public BillToParty? BillToParty { get; set; } /// @@ -96,7 +96,7 @@ public class AdvancedShipmentOptions /// /// Indicates if the package will be picked up or dropped off by the carrier /// - [JsonConverter(typeof(JsonStringEnumConverter))] + [JsonConverter(typeof(JsonStringEnumMemberConverter))] public OriginType? OriginType { get; set; } /// diff --git a/ShipEngine/Models/Dto/Common/CollectOnDelivery.cs b/ShipEngine/Models/Dto/Common/CollectOnDelivery.cs index e6ee271a..3a7d1b3c 100644 --- a/ShipEngine/Models/Dto/Common/CollectOnDelivery.cs +++ b/ShipEngine/Models/Dto/Common/CollectOnDelivery.cs @@ -12,7 +12,7 @@ public class CollectOnDelivery /// /// Types of payment that are supported /// - [JsonConverter(typeof(JsonStringEnumConverter))] + [JsonConverter(typeof(JsonStringEnumMemberConverter))] public PaymentType? PaymentType { get; set; } /// diff --git a/ShipEngine/Models/Dto/Common/Customs.cs b/ShipEngine/Models/Dto/Common/Customs.cs index 98379f7a..f7466ed6 100644 --- a/ShipEngine/Models/Dto/Common/Customs.cs +++ b/ShipEngine/Models/Dto/Common/Customs.cs @@ -12,7 +12,7 @@ public class Customs /// /// The type of contents in this shipment. This may impact import duties or customs treatment. /// - [JsonConverter(typeof(JsonStringEnumConverter))] + [JsonConverter(typeof(JsonStringEnumMemberConverter))] public PackageContents Contents { get; set; } /// diff --git a/ShipEngine/Models/Dto/Common/ShipmentItem.cs b/ShipEngine/Models/Dto/Common/ShipmentItem.cs index 2ac698a0..5c3e897f 100644 --- a/ShipEngine/Models/Dto/Common/ShipmentItem.cs +++ b/ShipEngine/Models/Dto/Common/ShipmentItem.cs @@ -51,7 +51,7 @@ public class ShipmentItem /// /// The order sources that are supported by ShipEngine /// - [JsonConverter(typeof(JsonStringEnumConverter))] + [JsonConverter(typeof(JsonStringEnumMemberConverter))] public OrderSourceCode? OrderSourceCode { get; set; } } } \ No newline at end of file diff --git a/ShipEngine/Models/Dto/CreateLabelFromRate/Params.cs b/ShipEngine/Models/Dto/CreateLabelFromRate/Params.cs index fdfde538..78f962c7 100644 --- a/ShipEngine/Models/Dto/CreateLabelFromRate/Params.cs +++ b/ShipEngine/Models/Dto/CreateLabelFromRate/Params.cs @@ -23,13 +23,13 @@ public class Params /// /// The layout (size) that you want the label to be in. /// - [JsonConverter(typeof(JsonStringEnumConverter))] + [JsonConverter(typeof(JsonStringEnumMemberConverter))] public LabelLayout LabelLayout { get; set; } /// /// The file format that you want the label to be in. /// - [JsonConverter(typeof(JsonStringEnumConverter))] + [JsonConverter(typeof(JsonStringEnumMemberConverter))] public LabelFormat LabelFormat { get; set; } /// @@ -41,7 +41,7 @@ public class Params /// /// The display format that the label should be shown in. /// - [JsonConverter(typeof(JsonStringEnumConverter))] + [JsonConverter(typeof(JsonStringEnumMemberConverter))] public DisplayScheme DisplayScheme { get; set; } } } \ No newline at end of file diff --git a/ShipEngine/Models/Dto/CreateLabelFromShipmentDetails/Params.cs b/ShipEngine/Models/Dto/CreateLabelFromShipmentDetails/Params.cs index 4bc66893..53207ad7 100644 --- a/ShipEngine/Models/Dto/CreateLabelFromShipmentDetails/Params.cs +++ b/ShipEngine/Models/Dto/CreateLabelFromShipmentDetails/Params.cs @@ -30,7 +30,7 @@ public class Params /// /// The label charge event. /// - [JsonConverter(typeof(JsonStringEnumConverter))] + [JsonConverter(typeof(JsonStringEnumMemberConverter))] public ChargeEvent? ChargeEvent { get; set; } /// @@ -155,19 +155,19 @@ public class Shipment /// /// Indicates if the package will be picked up or dropped off by the carrier /// - [JsonConverter(typeof(JsonStringEnumConverter))] + [JsonConverter(typeof(JsonStringEnumMemberConverter))] public OriginType OriginType { get; set; } /// /// The insurance provider to use for any insured packages in the shipment /// - [JsonConverter(typeof(JsonStringEnumConverter))] + [JsonConverter(typeof(JsonStringEnumMemberConverter))] public InsuranceProvider InsuranceProvider { get; set; } /// /// The order sources that are supported by ShipEngine /// - [JsonConverter(typeof(JsonStringEnumConverter))] + [JsonConverter(typeof(JsonStringEnumMemberConverter))] public OrderSourceCode? OrderSourceCode { get; set; } /// @@ -222,13 +222,13 @@ public class InternationalShipmentOptions /// /// The type of contents in this shipment. This may impact import duties or customs treatment. /// - [JsonConverter(typeof(JsonStringEnumConverter))] + [JsonConverter(typeof(JsonStringEnumMemberConverter))] public PackageContents Contents { get; set; } /// /// Indicates what to do if a package is unable to be delivered. /// - [JsonConverter(typeof(JsonStringEnumConverter))] + [JsonConverter(typeof(JsonStringEnumMemberConverter))] public NonDelivery NonDelivery { get; set; } /// diff --git a/ShipEngine/Models/Dto/GetRatesFromShipmentDetails/Params.cs b/ShipEngine/Models/Dto/GetRatesFromShipmentDetails/Params.cs index 95335909..3bf742e7 100644 --- a/ShipEngine/Models/Dto/GetRatesFromShipmentDetails/Params.cs +++ b/ShipEngine/Models/Dto/GetRatesFromShipmentDetails/Params.cs @@ -100,7 +100,7 @@ public class Shipment /// /// The type of delivery confirmation that is required for this shipment. /// - [JsonConverter(typeof(JsonStringEnumConverter))] + [JsonConverter(typeof(JsonStringEnumMemberConverter))] public DeliveryConfirmation Confirmation { get; set; } /// @@ -121,7 +121,7 @@ public class Shipment /// /// The insurance provider to use for any insured packages in the shipment. /// - [JsonConverter(typeof(JsonStringEnumConverter))] + [JsonConverter(typeof(JsonStringEnumMemberConverter))] public InsuranceProvider InsuranceProvider { get; set; } /// @@ -132,7 +132,7 @@ public class Shipment /// /// The order sources that are supported by ShipEngine /// - [JsonConverter(typeof(JsonStringEnumConverter))] + [JsonConverter(typeof(JsonStringEnumMemberConverter))] public OrderSourceCode OrderSourceCode { get; set; } /// diff --git a/ShipEngine/ShipEngine.csproj b/ShipEngine/ShipEngine.csproj index 68c44998..ae9602f4 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; - 2.0.0 + 2.0.1 ShipEngine ShipEngine The official ShipEngine C# SDK for .NET