kylewest / DotNetShipping

UPS, FedEx, USPS shipping rate calculators for .NET
MIT License
78 stars 66 forks source link

Feature/usps issue77 #75

Open StephenPAdams opened 6 years ago

StephenPAdams commented 6 years ago

I mistakenly called this feature issue77. This is actually in reference to #74.

This now allows a parameter called requireUniformMailServices (lovely name, right?) to be passed to the USPS providers (both domestic and international). If true, any mail services that aren't present in each returned package are excluded. If anything is excluded, a new field on the Shipment class called InfoMessages (which will have a list of InfoMessages) will populate with a message of all the excluded rates. In the future, the InfoMessages field can be leveraged for information like this...so you'll see a ShippingProvider and Message associated to each InfoMessage. :)

Finally, a "RatesExcluded" field will populate true on Shipment. This was used for unit testing on the USPS Domestic class, but more-so so that if rates are excluded...the consumer of the SDK can give a different message if they'd like to the user.

StephenPAdams commented 6 years ago

Hey @kylewest wanted to see if you can take a look into merging this. I've been using it in production for the last ~2 months without issue.