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

refactor: 💡 refactor #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mkercheval-tva
Copy link

  • Upgraded to .NET 8

  • Removed dependencies on RestSharp and Newtonsoft

  • Replaced Newtonsoft with System.Text.Json for serialization

  • Addressed issue of incompatible use of System.Text.Json and Newtonsoft

  • Modernized TaxjarAPI with the following objectives:

    • Made implementation injectable and testable
    • Utilized HttpClientFactory for best practices
    • Minimized reflection usage
  • Created public ITaxjarApi interface for custom implementations and mocks

  • Changed date properties from string to DateTime for proper serialization and direct access

  • Created TaxjarApiOptions class for configurable options

  • Added AddTaxjar extension method to register Taxjar with the service collection

  • Replaced RestSharp with HttpClientFactory to prevent port exhaustion and outdated DNS, and to leverage Polly for resilience

  • Removed all synchronous methods to embrace asynchronous operations in HttpClient

  • Changed method signatures to use strongly typed records instead of anonymous objects

  • Removed calls to GetProperty() and GetValue()

@CLAassistant
Copy link

CLAassistant commented Jul 2, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

- **Upgraded to .NET 8**
- **Removed dependencies on RestSharp and Newtonsoft**
- **Replaced Newtonsoft with System.Text.Json for serialization**
- **Addressed issue of incompatible use of System.Text.Json and
    Newtonsoft**
- **Modernized TaxjarAPI with the following objectives:**
  - Made implementation injectable and testable
  - Utilized HttpClientFactory for best practices
  - Minimized reflection usage

- Created public `ITaxjarApi` interface for custom implementations
  and mocks
- Changed date properties from `string` to `DateTime` for proper
  serialization and direct access
- Created `TaxjarApiOptions` class for configurable options
- Added `AddTaxjar` extension method to register Taxjar with the service
  collection
- Replaced RestSharp with `HttpClientFactory` to prevent port exhaustion
  and outdated DNS, and to leverage Polly for resilience
- Removed all synchronous methods to embrace asynchronous operations in
  HttpClient
- Changed method signatures to use strongly typed records instead of
  anonymous objects
- Removed calls to `GetProperty()` and `GetValue()`
@boylec
Copy link

boylec commented Aug 9, 2024

this refactor is great - I hope it gets merged.

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.

3 participants