Skip to content

Release 3.2.0: document-level discounts and factory body fixes - #29

Merged
emuuu merged 5 commits into
mainfrom
release/3.2.0
Sep 29, 2026
Merged

emuuu merged 5 commits into
mainfrom
release/3.2.0

Conversation

@emuuu

@emuuu emuuu commented Sep 29, 2026

Copy link
Copy Markdown
Owner
  • fix: send a body the live API accepts to Invoice/Factory/saveInvoice (every invoice factory save was rejected with 400)
  • fix: stop sending "id":0 on the other factory saves and REST creates
  • feat: read and write document-level discounts on invoices
  • chore: deprecate CreateAsync where the API documents no POST endpoint
  • ci: run dotnet test on Microsoft.Testing.Platform (CI on main has been red since Microsoft.Testing.Platform 2.3.3)

See CHANGELOG.md, section 3.2.0.

The live API rejected every invoice factory save with 400 ("invoice
expected array with 'id' and 'objectName'"), because the body sent
"id":0 without objectName/mapAll. The invoice now carries
objectName "Invoice" and mapAll, each position objectName "InvoicePos",
and id is sent only once it is set.
CreditNote, Order and Voucher factory saves had the same defect as the
invoice factory: the document went out with "id":0 and without
objectName/mapAll, its positions without objectName. They now follow
the invoice.

The plain REST creates sent "id":0 as well, which sevDesk answers for
POST /Contact with 404 "No Model_Contact with the id 0 was found". The
id is now omitted while it is zero on every model the package writes.
Adds DocumentDiscount, Invoice.SumDiscounts/SumDiscountNet/
SumDiscountGross and Invoice.Discounts (embed=discounts),
IInvoiceClient.GetDiscountsAsync, and SaveInvoiceAsync/
SaveInvoiceReferenceAsync overloads that send discounts in the
discountSave array of Invoice/Factory/saveInvoice.

The new interface members have default implementations, so existing
IInvoiceClient implementations keep compiling; they refuse to drop
discounts silently. Verified against the live API.
Marks CreateAsync on the credit note, order, voucher, their position,
category and check account clients as [Obsolete], pointing to the
factory saves. Invoice, InvoicePos and Tag CreateAsync stay, with a
note that their POST route is not in the specification.

Extends the REST create request-body tests to Category, Tag and
CheckAccount, and records the known limitations of the credit note,
order and voucher saves in the changelog.
Since Microsoft.Testing.Platform 2.3.3, dotnet test on the .NET 10 SDK
refuses the VSTest target, which has kept CI red on main and would
fail the test step of the release workflow. Opt in via global.json;
the workflow commands stay unchanged.
@emuuu
emuuu merged commit cc2cd6b into main Sep 29, 2026
1 check passed
@emuuu
emuuu deleted the release/3.2.0 branch September 29, 2026 10:42
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