taxjar / taxjar.net

Sales Tax API Client for .NET / C#
https://developers.taxjar.com/api/reference/?csharp
MIT License
23 stars 23 forks source link

Use Inheritance for some models #3

Closed recheej closed 7 years ago

recheej commented 7 years ago

The Breakdown object has Shipping and LineBreadowns. All 3 of these objects have very similar properties. The common properties be put into a BaseBreakdown and individual breakdowns (Shipping, Line) could inherit. Any reason this couldn't be done?

fastdivision commented 7 years ago

@recheej This is a good idea. We have some minor differences in the attribute names among the 3 breakdowns that we hope to fix in a future iteration of our API, e.g. state_tax_rate vs. state_sales_tax_rate and state_tax_collectable vs. state_amount. I tried this out and it's definitely an improvement, with the added benefit of seeing these differences.

I'll get a PR up shortly. Thanks for the feedback!