Skip to content

Commit

Permalink
refactor: 💡 refactor
Browse files Browse the repository at this point in the history
- **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()`
  • Loading branch information
mkercheval-tva committed Jul 2, 2024
1 parent e952305 commit 77b5594
Show file tree
Hide file tree
Showing 67 changed files with 6,517 additions and 3,937 deletions.
494 changes: 483 additions & 11 deletions .gitignore

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [5.0.0] - 2024-06-27
- Replaced RestSharp with Microsoft.Extensions.Http
- Replaced Newtonsoft.Json with System.Text.Json
- Added ITaxjarApi interface
- Refactor tests
- Remove synchronous methods
- Update target framework to netstandard2.1

## [4.0.0] - 2023-11-07
- Update RestSharp to version 108.0.3
- Update Newtonsoft.Json to version 13.0.3
Expand Down
Loading

0 comments on commit 77b5594

Please sign in to comment.