XeroAPI / Xero-NetStandard

A wrapper of the Xero API in the .NetStandard 2.0 framework. Supports Accounting, Payroll AU/US, and Files
MIT License
127 stars 124 forks source link

GetContactsAsyncWithHttpInfo failing with Method not found #536

Closed mar72vin closed 3 months ago

mar72vin commented 3 months ago

SDK you're using (please complete the following information):

I've updated from an earlier version to version 6.0.0 to get around a problem where the new Xero plans/enums were causing the api to break.

I now have an issue with getting contacts.

var _httpResponse = System.Threading.Tasks.Task.Run(async () => await _accountingAPI.GetContactsAsyncWithHttpInfo(_tokenPair.Token.AccessToken, _tokenPair.TenantID.ToString(), includeArchived: true, page: i)).Result;

This line causes an error that the method signature does not exist. I've looked through the v6 code and seems that all the parameters exist and the ones i'm not using are optional. So I can't see what the problem would be.

Has anyone else encountered this?

Below is the actual error.

Method not found: 'System.Threading.Tasks.Task1<Xero.NetStandard.OAuth2.Client.ApiResponse1> Xero.NetStandard.OAuth2.Api.AccountingApi.GetContactsAsyncWithHttpInfo(System.String, System.String, System.Nullable1, System.String, System.String, System.Collections.Generic.List1, System.Nullable1, System.Nullable1, System.Nullable1)'.

this is the method signature in the v6 code: System.Threading.Tasks.Task<ApiResponse<Contacts>> GetContactsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, List<Guid> iDs = null, int? page = null, bool? includeArchived = null, bool? summaryOnly = null, string searchTerm = null, CancellationToken cancellationToken = default);

github-actions[bot] commented 3 months ago

PETOSS-548

github-actions[bot] commented 3 months ago

Thanks for raising an issue, a ticket has been created to track your request

mar72vin commented 3 months ago

I'm running this in a console app. It is possible that there are some old references somewhere, but I haven't been able to track them down.

mar72vin commented 3 months ago

I turns out that it was referencing another project that had an old xero nuget package. No compiler complaints, but after upgrading the package in that project, cleaning the solution and re-building everything is working as expected.