Skip to content

fix: update bank transaction with minimal payload#197

Open
miachillgood wants to merge 1 commit into
XeroAPI:mainfrom
miachillgood:codex/fix-bank-transaction-line-items
Open

fix: update bank transaction with minimal payload#197
miachillgood wants to merge 1 commit into
XeroAPI:mainfrom
miachillgood:codex/fix-bank-transaction-line-items

Conversation

@miachillgood

Copy link
Copy Markdown

Summary

  • send a minimal bank transaction update payload instead of spreading the full fetched transaction back into the update request
  • keep the existence check, but only include fields that the caller explicitly wants to change
  • add a handler test that verifies line-item updates do not resend unrelated fields like status or bankTransactionID

Why

Issue #184 reports that update-bank-transaction fails whenever lineItems are included. The previous implementation reused the full bank transaction returned by Xero and sent that object back through updateBankTransaction. This can include read-only or response-only fields that are not needed for an update request and are more likely to break line item recategorisation flows.

Validation

  • npm test
  • npm run lint

Closes #184

@miachillgood miachillgood marked this pull request as ready for review June 12, 2026 11:40
@miachillgood miachillgood changed the title [codex] Fix update-bank-transaction line item updates fix: update bank transaction with minimal payload Jun 14, 2026
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.

update-bank-transaction fails when lineItems are sent

1 participant