Repository navigation
Release 3.2.0: document-level discounts and factory body fixes - #29
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Invoice/Factory/saveInvoice(every invoice factory save was rejected with 400)"id":0on the other factory saves and REST createsCreateAsyncwhere the API documents noPOSTendpointdotnet teston Microsoft.Testing.Platform (CI on main has been red since Microsoft.Testing.Platform 2.3.3)See CHANGELOG.md, section 3.2.0.