Skip to content

Commit

Permalink
Add state to UPS provider [#32 #47]
Browse files Browse the repository at this point in the history
  • Loading branch information
kylewest committed Jul 11, 2016
1 parent ca350b4 commit ce2ae79
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions DotNetShipping/ShippingProviders/UPSProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ private byte[] BuildRatesRequestMessage()
writer.WriteEndElement(); // </Shipper>
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);
Expand Down

0 comments on commit ce2ae79

Please sign in to comment.