XeroAPI / Xero-NetStandard

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

Exception during during execution GetPayItemsAsyncWithHttpInfo #437

Open piotrsidor opened 2 years ago

piotrsidor commented 2 years ago

Version:

Describe the bug

Task<ApiResponse<PayItems>> GetPayItemsAsyncWithHttpInfo(
      string accessToken,
      string xeroTenantId,
      DateTime? ifModifiedSince = null,
      string where = null,
      string order = null,
      int? page = null);

During of execution message above when on Xero portal is added Paid Parental Leave, method return exception Error converting value "PAIDPARENTALLEAVE" to type 'Xero.NetStandard.OAuth2.Model.PayrollAu.EarningsType'. Path 'PayItems.EarningsRates[15].EarningsType', line 1, position 5141.

To Reproduce Steps to reproduce the behavior:

  1. Go to Xero
  2. Create a pay item (Paid Parental Leave)
  3. Try get pay items using GetPayItemsAsyncWithHttpInfo

Expected behavior GetPayItemsAsyncWithHttpInfo should return xero pay items.

Screenshots image

Abhisha1 commented 2 years ago

Hi @psiplandy 👋🏾 I've had a look into this issue and haven't been able to reproduce this issue following the steps you provided (link to the sample app PR that verifies this) .

Just want to double check that the current version you are using is the latest (Xero.NetStandard.OAuth2 3.27.0) as I can see 3.26.0 does not have the PAIDPARENTALLEAVE EarningsType added.

Otherwise, is there any further screenshots/information you can provide about the error and where exactly the error is being reported so we can investigate further?

Thanks