Upgrading from 0.3.x to 0.4? See Upgrading to 0.4.
Version 0.3.0 of the three packages reorganizes the models. It is a breaking release; use this page as a checklist.
Upgrade to 0.3.1 or later, not 0.3.0. Version 0.3.0 fails to read customers and products from a live DK Plus company, because DK Plus returns enum fields as numbers although its API documentation describes strings. 0.3.1 fixes this; the public API is the same.
Gender and UBL.AccountingCostType, product ItemClass and CostMethod, employee time-clock stamps, product categories, vendor transactions, and v2 project journals).Project.Status ("InProgress" instead of "1"), v2 order and quote Status, Employee.Status ("Active" instead of "0"), token types, customer transaction record types, and project transaction fields. Code that compared these strings with digits must compare with the names.| Before | Now |
|---|---|
Portable Customer, Product, Project, Employee, and sales-document models carried DK Plus fields |
Portable models are lean and unsealed; DK Plus data moved to sealed DkPlus<Entity> subtypes returned by IDkPlusClient |
CustomerOptions and customer.Options.VatExempt |
Flat DkPlusCustomer members: VatExempt, ReceivablesAccount, ReceiversActive, PriceGroup, BillingFee |
nameof(Customer.VatNumber) in Include |
nameof(DkPlusCustomer.VatNumber); VatNumber, IndustryClassificationCode, Gender, VatExempt, and ReceivablesAccount are not on the portable Customer |
CreateAsync and UpdateAsync overloads that accepted read models |
{Entity}CreateRequest for the full document and sparse {Entity}UpdateRequest with the identity as the path argument; no compatibility overloads |
InvoiceDraft, InvoiceLine |
SalesInvoiceCreateRequest, SalesInvoiceLineRequest |
VendorInvoiceDraft, VendorInvoiceDraftLine |
VendorInvoiceCreateRequest, VendorInvoiceLineRequest |
ProjectRequest, Project.Request |
WorkRequest, Project.WorkRequest (WorkRequestCreateRequest, WorkRequestUpdateRequest) |
VendorBankAccount |
BankAccount |
Vendor.NoVat alias, SalesPersonDetails, Sales.Person.GetDetailsAsync |
DkPlusVendor.VatExempt; Sales.Person.GetAsync returns the complete DkPlusSalesPerson |
| No portable vendor | IExternalErpClient.Purchase.Vendor (IErpPurchaseResource) with ErpCapability.Vendors; vendor invoices stay DK-specific |
| DK Plus enum fields as strings | C# enums with clean member names; the documented name or its numeric position maps to the member, and any other value reads as null and stays in AdditionalData |
| Vendor invoice attachments | FileAttachment; a response without a name or content raises DkPlusContractException |
DkPlusGender, TokenUpdate |
Gender, TokenUpdateRequest |
Status and DeliveryStatus strings on sales order/quote requests, Status string on project requests, DkPlusSalesOrder.DeliveryStatus string |
SalesDocumentStatus?, SalesOrderDeliveryStatus?, ProjectStatus?; the portable read Status stays a string |
Employee payroll fields (SpouseName, BankAccount, ...) in AdditionalData |
Stripped on every read and never written; projections may Exclude them only |
Also new in 0.3.0: v1 invoice and v2 document parties reject members that DK Plus cannot store (for example a customer ContactName on a v1 invoice) before any request is sent, and request extension data can no longer override a typed member. v2 sales documents now keep unknown nested party, contact, carrier, and extra-details members in each object's AdditionalData.
If portable code returns or logs the objects it receives from IExternalErpClient, remember that the instances are DkPlus* subtypes. Serializers that use the runtime type, such as ASP.NET Core output formatters and Serilog {@Customer}, write every subtype member. Project the results to your own DTOs. See Models and writes.
| Before | Now |
|---|---|
customer get C-100 --expand Options |
customer get C-100 --expand Settings (Options is no longer accepted) |
Customer JSON output with a nested options object |
Flat DkPlusCustomer shape: vatExempt, receivablesAccount, receiversActive, priceGroup, and billingFee sit beside credit, invoiceDelivery, and electronicInvoicing |
product update --item-code ITEM-1 ... |
product update ITEM-1 ... (positional item code) |
project request ... |
project work-request ...; --type and --status take enum member names |
Column profile project.request |
project.work-request |
Stored column selection Options.VatExempt |
VatExempt; a stale selection stops with a message asking you to reset or update it |
Vendor invoice and transaction JSON keys ID, Dim1, UnApproved |
id, dimension1, Unapproved |
purchase invoice attachment without --output wrote to the server-supplied path |
Saves the sanitized last segment of the server name in the current directory, never elsewhere |
Product --file documents with Attachments, Changes, or RecordId were silently dropped |
Rejected on stderr with exit code 2 as read-only keys |
--file documents shaped like the old read models |
The new CreateRequest and UpdateRequest documents. Unknown keys on types without extension data, keys from the previous release, renamed or read-only keys, and identity keys in update files are rejected on stderr with exit code 2, naming the replacement |
Ordinary create and update commands still need no --yes; destructive and safety-sensitive commands keep it. See the command reference for the document type of each command.