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

Fix tax breakdown attribute deserialization #23

Merged
merged 2 commits into from
Jan 2, 2019

Conversation

fastdivision
Copy link
Contributor

@fastdivision fastdivision commented Jan 2, 2019

Special district attributes in the order-level and shipping breakdowns for /v2/taxes were returning zero. Our specs didn't catch this because the fixture contained zero values for special district. RestSharp's default JSON serializer via SimpleJson wasn't picking up the mapped JSON properties, so we need to make sure that responses are always deserialized using Newtonsoft.Json. RestSharp plans to use Newtonsoft.Json in an upcoming version.

By default RestSharp uses SimpleJson for deserializing responses. `DeserializeAs` has a variety of issues with nested JSON and underscores. Until RestSharp brings it back, we should always use Newtonsoft.Json for deserializing objects in the API client.
@fastdivision fastdivision merged commit 1c1fad8 into master Jan 2, 2019
@fastdivision fastdivision deleted the breakdown-deserialize-fix branch January 2, 2019 23:54
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

Successfully merging this pull request may close these issues.

1 participant