Hi,
We are using the new UPS OAuth API credentials and we ran into an issue that results in an exception:
2024-06-10 21:23:12.9114|INFO|eCom/ShippingProvider/Dynamicweb.Ecommerce.ShippingProviders.UPS.UPS/Request|'Newtonsoft.Json.Linq.JProperty' does not contain a definition for 'Code'
2024-06-10 21:23:12.8964|INFO|eCom/ShippingProvider/Dynamicweb.Ecommerce.ShippingProviders.UPS.UPS/Response|UCART1555: {"RateResponse":{"Response":{"ResponseStatus":{"Code":"1", "Description":"Success"}, "Alert":{"Code":"110971", "Description":"Your invoice may vary from the displayed reference rates"}, "TransactionReference":{"CustomerContext":"uat-ic.mydwsite1.com:443", "TransactionIdentifier":"ciewssoas6b8y8bHZkhZNy"}}, "RatedShipment":{"Service":{"Code":"01", "Description":""}, "RatedShipmentAlert":{"Code":"110971", "Description":"Your invoice may vary from the displayed reference rates"}, "BillingWeight":{"UnitOfMeasurement":{"Code":"LBS", "Description":"Pounds"}, "Weight":"22.0"}, "TransportationCharges":{"CurrencyCode":"USD", "MonetaryValue":"248.55"}, "ServiceOptionsCharges":{"CurrencyCode":"USD", "MonetaryValue":"0.00"}, "TotalCharges":{"CurrencyCode":"USD", "MonetaryValue":"248.55"}, "GuaranteedDelivery":{"BusinessDaysInTransit":"1", "DeliveryByTime":"10:30 A.M."}, "RatedPackage":{"TransportationCharges":{"CurrencyCode":"USD", "MonetaryValue":"248.55"}, "ServiceOptionsCharges":{"CurrencyCode":"USD", "MonetaryValue":"0.00"}, "TotalCharges":{"CurrencyCode":"USD", "MonetaryValue":"248.55"}, "Weight":"21.5", "BillingWeight":{"UnitOfMeasurement":{"Code":"LBS", "Description":"Pounds"}, "Weight":"22.0"}}}}}
After debugging it, I found that it is related to RatedShipmentAlert object, which sometimes returns an array and others just an object.
https://dev.azure.com/dynamicwebsoftware/_git/Dynamicweb?path=/src/22%20-%20Providers/Ecommerce/Shipping/Dynamicweb.Ecommerce.ShippingProviders.UPS/UPS.cs - lines 758-770
A possible fix could be:
DW 9.17.5.
BR Mario