feat: Bank Transfers: soft-delete, status, and tracking categories#822
feat: Bank Transfers: soft-delete, status, and tracking categories#822jeremy-drummond-xero wants to merge 1 commit into
Conversation
| - accounting.transactions | ||
| tags: | ||
| - Accounting | ||
| operationId: deleteBankTransfer |
There was a problem hiding this comment.
I named the soft-delete ops delete* (not update*): delete is the only mutation the endpoint honours today — any other field-update 400s — and delete* keeps us consistent with deletePayment/deleteBatchPayment. The one tension is that if transfers ever become editable, renaming delete*→update* is a breaking SDK change for a non-breaking API addition — but I've check and it looks like SDK versions can be managed independently of the spec, so that rename can be absorbed without forcing a spec-version break.
| type: array | ||
| items: | ||
| $ref: "#/components/schemas/BankTransferDelete" | ||
| TrackingReference: |
There was a problem hiding this comment.
Introduced TrackingReference rather than reusing TrackingCategory or LineItemTracking because the bank transfer tracking contract is write-by-ID-only with names echoed back on read. That requires Name/Option to be readOnly. TrackingCategory is the wrong entity (carries Status + nested Options[]), and LineItemTracking presents Name/Option as writable — reusing either would have the contract slightly wrong.
Overview
Extends the Accounting OpenAPI spec for
/BankTransfersto reflect new endpoint capabilities: soft-deleting transfers (single and bulk), aStatusfield on responses, and tracking categories on reads and create.Changes
New
Statusfield (BankTransferschema, read-only)AUTHORISEDorDELETED.New tracking categories (
BankTransferschema)FromTrackingandToTrackingarrays, surfaced on GET (index + by-id) and create responses.TrackingReferenceschema:TrackingCategoryID+TrackingOptionIDon write; resolvedName+Optionechoed back on read (read-only). Max 2 per account.Soft-delete operations (two new
POSToperations)deleteBankTransfer—POST /BankTransfers/{BankTransferID}, single transfer; body carriesStatus: DELETED(BankTransferDeleteschema).deleteBankTransfers—POST /BankTransfers, bulk array of{BankTransferID, Status}(BankTransfersDeleteschema).Status: DELETED.New
includeDeletedquery parameter (GET /BankTransfers)DELETEDtransfers in the index response. Default behaviour (deleted excluded) is unchanged.