Open borissedov opened 1 year ago
@borissedov this calculation is technically incorrect. FedEx wants you to round fractions to the nearest whole inch. So 4.4 becomes 4 and 4.5 becomes 5. Your change may result in undersized calculation. https://www.fedex.com/en-us/shipping/packaging/what-is-dimensional-weight.html
I understand that it may cause rounding issue but the Fedex API doesn’t accept float values for this field. I have found it in our project and want to share the experience.
Yes I understand. I would suggest that you do actual rounding using Math.Round() instead of simply casting to an integer. This will make the value correct.
The existing behaviour leads to XSD scheme validation errors. The dimensions suppose to be passed as Integer values.