Skip to content

BookDepreciationSetting.EffectiveLifeYears int? - decimal? sterilization error #634

@CloudMinki

Description

@CloudMinki

SDK you're using (please complete the following information):
Xero.NetStandard.OAuth2 v12.5

Describe the bug
BookDepreciationSetting.EffectiveLifeYears has a type of int? but is a decimal? value in Xero causing a serialization error.

To Reproduce
Steps to reproduce the behavior:

  1. Create fixed asset with depreciation set to years
  2. Make GetAssets API call

Additional context
Xero.NetStandard.OAuth2.Client.ApiException: Input string '10.00' is not a valid integer. Path 'items[1].bookDepreciationSetting.effectiveLifeYears', line 1, position 1811.
at Xero.NetStandard.OAuth2.Client.CustomJsonCodec.Deserialize(HttpResponseMessage response, Type type)
at Xero.NetStandard.OAuth2.Client.CustomJsonCodec.Deserialize[T](HttpResponseMessage response)
at Xero.NetStandard.OAuth2.Client.ApiClient.Exec[T](HttpRequestMessage req, IReadableConfiguration configuration, CancellationToken cancellationToken)
at Xero.NetStandard.OAuth2.Client.ApiClient.GetAsync[T](String path, RequestOptions options, IReadableConfiguration configuration, CancellationToken cancellationToken)
at Xero.NetStandard.OAuth2.Api.AssetApi.GetAssetsAsyncWithHttpInfo(String accessToken, String xeroTenantId, AssetStatusQueryParam status, Nullable1 page, Nullable1 pageSize, String orderBy, String sortDirection, String filterBy, CancellationToken cancellationToken)
at Xero.NetStandard.OAuth2.Api.AssetApi.GetAssetsAsync(String accessToken, String xeroTenantId, AssetStatusQueryParam status, Nullable1 page, Nullable1 pageSize, String orderBy, String sortDirection, String filterBy, CancellationToken cancellationToken)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions