From ce2ae79cc44e491e276b8dbbcaeaeefe0c0707da Mon Sep 17 00:00:00 2001 From: Kyle West Date: Mon, 11 Jul 2016 15:31:52 +0000 Subject: [PATCH] Add state to UPS provider [#32 #47] --- DotNetShipping/ShippingProviders/UPSProvider.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DotNetShipping/ShippingProviders/UPSProvider.cs b/DotNetShipping/ShippingProviders/UPSProvider.cs index 06716a4..2c7060f 100644 --- a/DotNetShipping/ShippingProviders/UPSProvider.cs +++ b/DotNetShipping/ShippingProviders/UPSProvider.cs @@ -177,6 +177,10 @@ private byte[] BuildRatesRequestMessage() writer.WriteEndElement(); // writer.WriteStartElement("ShipTo"); writer.WriteStartElement("Address"); + if (!string.IsNullOrWhiteSpace(Shipment.DestinationAddress.State)) + { + writer.WriteElementString("StateProvinceCode", Shipment.DestinationAddress.State); + } if (Shipment.DestinationAddress.IsUnitedStatesAddress() || Shipment.DestinationAddress.IsCanadaAddress()) { writer.WriteElementString("PostalCode", Shipment.DestinationAddress.PostalCode);