0

I have integrated the XERO-API on my java application and I need to display a list of Assets along with their AssetType.

I have seen that when you make a Postman call to get all Assets, the JSON object items returned contain the "assetTypeId" attribute as well as in the API documentation the "assetTypeId" attribute is returned.

However the Asset.class from the java sdk does not contain the "assetTypeId" property. Is there another way to get the AssetType from an Asset using the xero-api java sdk? I am using v3.5.2 of the jar.

  • Hey Jason - looks like assetTypeId is missing from our OpenAPI specs we use to generate our SDKs. I've added it in this PR. https://github.com/XeroAPI/Xero-OpenAPI/pull/189 You should see this rollout into the Java SDK in the next week or two. – sidney.maestre Apr 18 '20 at 00:19

1 Answers1

0

that field should be serialized back based on the model definition. Can you post back what you are receiving from the SDK

public class AssetType {
  @JsonProperty("assetTypeId")
  private UUID assetTypeId;

  @JsonProperty("assetTypeName")
  private String assetTypeName;

  ... etc

Source

https://github.com/XeroAPI/Xero-Java/blob/master/src/main/java/com/xero/models/assets/AssetType.java#L33

Let me know what is being returned and we try to see why thats not being serialized back.

SerKnight
  • 2,502
  • 1
  • 16
  • 18