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

RestSharp Method Not Found - RestSharp #69

Open NHastings22 opened 9 months ago

NHastings22 commented 9 months ago

Issue

After installing version 4.0.0 of TaxJar and attempting to instantiate a new instance of TaxjarApi. When calling a new instance, the program is throwing a Method Not Found error.

Error

System.MissingMethodException: 'Method not found: 'Void RestSharp.RestClient..ctor(RestSharp.RestClientOptions, System.Action`1)'.'

Code Causing Error

public TaxJarInterface(ITaxJarSecurity taxJarSecurity, int timeout = 0)
{
    if (string.IsNullOrEmpty(taxJarSecurity.ApiKey))
        throw new ArgumentNullException("apiToken", "Please provide an API token");

    ApiInterface = new TaxjarApi(taxJarSecurity.ApiKey)
    {
        apiUrl = $"https://{(!taxJarSecurity.DemoMode ? TaxJarConstants.DefaultApiUrl : TaxJarConstants.SandboxApiUrl)}",
        timeout = timeout
    };
}
NHastings22 commented 9 months ago

Upon additional investigation, this issue has been resolved in the repository but hasn't been packed and published to NuGet.