Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shouldn't some properties be nullable? #51

Open
ScottAtRedHawk opened this issue May 18, 2021 · 0 comments
Open

Shouldn't some properties be nullable? #51

ScottAtRedHawk opened this issue May 18, 2021 · 0 comments

Comments

@ScottAtRedHawk
Copy link

Hi,
I was comparing this Tax class to the API for Calculating sales tax for an order and noticed shouldn't certain fields be nullable? For example, Tax.Amount and Tax.Shipping should be of type decimal?, right? Shouldn't any parameter that is considered optional in the API docs be nullable? When serializing any classes before sending them to the API (

request.AddParameter("application/json", JsonConvert.SerializeObject(body), ParameterType.RequestBody);
), the default values for certain types are being set and sent instead of null (or nothing if NullValueHandling = NullValueHandling.Ignore is being set).

This should be changed in all classes that have optional API parameters not just the Tax class referenced above.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant