Skip to content

feat: batches, cancel, deduction, simples rates; MEI and Simples Nacional only - #7

Merged
pedrohrod merged 1 commit into
mainfrom
feat/align-contract-batches-cancel-simples
Oct 26, 2026
Merged

pedrohrod merged 1 commit into
mainfrom
feat/align-contract-batches-cancel-simples

Conversation

@pedrohrod

Copy link
Copy Markdown
Contributor

What changed

Aligns the Java SDK with the current contract at https://corvo.tech/llms-full.txt.

  • invoices().createBatch(List<InvoiceBatchItem>) for POST /v1/invoices/batches (1 to 50 items, per-item idempotency key, no Idempotency-Key header). Returns InvoiceBatchSummary with Result entries (accepted, rejected, replayed, error).
  • invoices().cancel(id, InvoiceCancelParams) for POST /v1/invoices/:id/cancel (this SDK had no cancellation yet).
  • InvoiceCreateParams.deduction (+ withDeduction); Invoice gains discount, deduction and the cancellation* components.
  • CompanyCreateParams and CompanyUpdateParams gain simplesRate and simplesIssRate (+ withSimplesRate, withSimplesIssRate).
  • Webhook.WEBHOOK_EVENTS now lists the 11 public events (adds nfse.invoice.cancelled and nfse.invoice.cancellation_rejected).
  • README: MEI and Simples Nacional only, simplesRate, deduction, batches, cancellation.

Source compatibility: the previous canonical constructors of InvoiceCreateParams, CompanyCreateParams and CompanyUpdateParams are kept, so existing callers still compile. The Invoice record gets six trailing components (it is built by Jackson, not by callers).

Checks

mvn test passes on JDK 27 (new tests in InvoicesResourceTest, events test updated).

🤖 Generated with Claude Code

…onal only

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@pedrohrod pedrohrod self-assigned this Oct 26, 2026
@pedrohrod
pedrohrod merged commit 9c46cab into main Oct 26, 2026
3 checks passed
@pedrohrod
pedrohrod deleted the feat/align-contract-batches-cancel-simples branch October 26, 2026 17:17
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.

1 participant