Skip to content

v0.7.0

Choose a tag to compare

@FernandoCelmer FernandoCelmer released this 06 Sep 16:06
· 21 commits to main since this release

What's Changed

  • Cancel takes RequestOptions, so a cancellation can carry an idempotency key

Why

Issue and Reissue already accepted the key; Cancel — the one irreversible call, inside a legal window — did not. A dropped connection or a retry sent a second cancellation.

result, err := invoice.Cancel(
    accessKey,
    stackin.NFSE,
    "Pedido cancelado pelo comprador",
    stackin.WithIdempotencyKey("cancel-8f21"),
)

The same key with the same body replays the stored answer. A different body under the same key is refused, not silently accepted. Nothing generates a key for you: two calls without one are two cancellations, deliberately.

The variadic parameter is additive — existing three-argument calls still compile.