Skip to content

fix: deserialize Id-suffixed tracking option keys#813

Open
miachillgood wants to merge 1 commit into
XeroAPI:masterfrom
miachillgood:fix/deserialize-id-suffix-variants
Open

fix: deserialize Id-suffixed tracking option keys#813
miachillgood wants to merge 1 commit into
XeroAPI:masterfrom
miachillgood:fix/deserialize-id-suffix-variants

Conversation

@miachillgood

Copy link
Copy Markdown

Summary

  • allow accounting model deserialization to fall back from ...ID to ...Id keys
  • add a regression test covering TrackingOptionId inside invoice line-item tracking data

Why

#777 reports that trackingOptionID is defined in the SDK types but stays undefined when getInvoices() returns tracking data.

The generated accounting deserializer currently only reads exact ...ID keys. When the API response uses an ...Id variant, the value is dropped during deserialization.

Testing

  • npm test -- --runInBand src/test/objectSerializer.spec.ts
  • npm run build

Closes #777

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TrackingOptionId value missing from accountingApi.getInvoices()

1 participant