Skip to content

v0.18.1: working-order cancellation references

Choose a tag to compare

@joaquinbejar joaquinbejar released this 15 Sep 11:46
· 8 commits to main since this release
ac48de7

Working-order cancellation references

IG acknowledges a working-order cancellation with a deal reference, and until now delete_working_order discarded it. This release adds OrderService::delete_working_order_with_reference(deal_id), which returns that acknowledgement as the existing CreateWorkingOrderResponse so callers can reconcile the exact submission through get_order_confirmation. A successful response acknowledges submission, not confirmed deletion.

The single-attempt policy from 0.18.0 is unchanged: both cancellation methods send DELETE /workingorders/otc/{dealId} (version 2) at most once per invocation, with no status retries, key rotation, redirects or post-send authentication replay. If the response is lost the reference may be unavailable; reconcile the working order instead of repeating the cancellation to recover it.

Added

  • OrderService::delete_working_order_with_reference(deal_id) -> Result<CreateWorkingOrderResponse, AppError>.
  • A non-sending trait default that returns AppError::InvalidInput, so existing external OrderService implementations (including dyn OrderService users) compile unchanged. Implementors override it to expose the real acknowledgement.
  • doc/CANCELLATION_REFERENCE.md with the submission, reconciliation and compatibility contract.

Changed

  • Client::delete_working_order delegates once to the new method and discards only the acknowledgement; its signature and SingleAttempt policy are unchanged.
  • The cancellation debug log now reports the acknowledgement instead of the misleading "created" message.

Unchanged

  • Request and response DTOs, error variants, dependencies and feature flags.
  • IG Version headers and the trading rate-limit class of every mutation.

Closes #103 via #102.