From e9a57c7d6ba8237468caa088d68a7c8e2e9e1821 Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Tue, 5 Jul 2022 09:48:43 +0200 Subject: [PATCH 01/37] CustomerInvoice Location --- Visma.net/Models/CustomerInvoice.cs | 2 +- Visma.net/Visma.net.csproj | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Visma.net/Models/CustomerInvoice.cs b/Visma.net/Models/CustomerInvoice.cs index 450c061..8ff7ddc 100644 --- a/Visma.net/Models/CustomerInvoice.cs +++ b/Visma.net/Models/CustomerInvoice.cs @@ -264,7 +264,7 @@ public DateTime lastModifiedDateTime public LocationSummary location { - get => Get("locationId", new LocationSummary()); + get => Get("locationId"); set => Set(value, "locationId"); } diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index bc62643..6a8636e 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -4,7 +4,7 @@ Visma.net Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 - 3.7.4.19 + 3.7.4.20 Get started with Visma.net Integrations. ON IT AS ON IT AS @@ -20,8 +20,8 @@ https://sync-it.no/Images/on-it_logo.png LICENSE.md - 3.7.4.19 - 3.7.4.19 + 3.7.4.20 + 3.7.4.20 From 06a435c3e668789b25a24a29386584e488753f79 Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Wed, 6 Jul 2022 14:59:23 +0200 Subject: [PATCH 02/37] Added GetAllItemClasses --- Visma.net/Visma.net.csproj | 8 +++----- Visma.net/lib/Data/InventoryData.cs | 5 +++++ Visma.net/lib/VismaNetApiHelper.cs | 23 +++++++++++++++++++++++ 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index 16dbac8..204bc88 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -4,7 +4,7 @@ Visma.net Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 - 3.7.4.20 + 4.0.3.2 netstandard2.0;net462;net6 Visma.net Copyright © ON IT AS 2014 - 2022 @@ -23,12 +23,10 @@ https://sync-it.no/Images/on-it_logo.png LICENSE.md - 3.7.4.20 - 3.7.4.20 on_it_logo.png README.md - 4.0.0 - 4.0.0 + 4.0.3.2 + 4.0.3.2 diff --git a/Visma.net/lib/Data/InventoryData.cs b/Visma.net/lib/Data/InventoryData.cs index 0b2ff44..53d82c0 100644 --- a/Visma.net/lib/Data/InventoryData.cs +++ b/Visma.net/lib/Data/InventoryData.cs @@ -43,5 +43,10 @@ public async Task> GetAllAvailabilityUpdatedSince(DateTime dateT }); } } + + public async Task> GetAllItemClasses() + { + return await VismaNetApiHelper.GetAllItemClasses(Authorization); + } } } \ No newline at end of file diff --git a/Visma.net/lib/VismaNetApiHelper.cs b/Visma.net/lib/VismaNetApiHelper.cs index ff38bba..aef6fd6 100644 --- a/Visma.net/lib/VismaNetApiHelper.cs +++ b/Visma.net/lib/VismaNetApiHelper.cs @@ -81,6 +81,29 @@ public static async Task> FetchContactsForSupplier(string supplier } } + public static async Task> GetAllItemClasses(VismaNetAuthorization authorization) + { + var webclient = GetHttpClient(authorization); + { + var apiUrl = GetApiUrlForController(VismaNetControllers.Inventory); + try + { + var fullUrl = $"{apiUrl}/itemClass"; + return await webclient.Get>(fullUrl); + } + catch (AggregateException e) + { + VismaNetExceptionHandler.HandleException(e); + } + catch (WebException e) + { + VismaNetExceptionHandler.HandleException(e); + } + + return null; + } + } + public static async Task> FetchCustomerSalesPricesForItem(string itemNo, VismaNetAuthorization authorization, PriceType priceType = PriceType.Undefined) { From cd55dfd68651a183c069c6795cf5bee057eb88d9 Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Thu, 18 Aug 2022 11:14:00 +0200 Subject: [PATCH 03/37] Added Overrideseries to SalesOrder --- Visma.net/Models/SalesOrderLine.cs | 5 +++++ Visma.net/Visma.net.csproj | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Visma.net/Models/SalesOrderLine.cs b/Visma.net/Models/SalesOrderLine.cs index 97895cd..d7ce0b8 100644 --- a/Visma.net/Models/SalesOrderLine.cs +++ b/Visma.net/Models/SalesOrderLine.cs @@ -275,5 +275,10 @@ public string externalLink get => Get(); set => Set(value); } + public bool overrideNumberSeries + { + get => Get(); + set => Set(value); + } } } \ No newline at end of file diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index 204bc88..85c3e37 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -4,7 +4,7 @@ Visma.net Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 - 4.0.3.2 + 4.0.3.3 netstandard2.0;net462;net6 Visma.net Copyright © ON IT AS 2014 - 2022 @@ -25,8 +25,8 @@ LICENSE.md on_it_logo.png README.md - 4.0.3.2 - 4.0.3.2 + 4.0.3.3 + 4.0.3.3 From 872aac9f189500ab28539ee2b8c737fc55e5aa89 Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Thu, 18 Aug 2022 11:20:45 +0200 Subject: [PATCH 04/37] Fix for salesorder line --- Visma.net/Models/SalesOrder.cs | 6 ++++++ Visma.net/Models/SalesOrderLine.cs | 6 +----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Visma.net/Models/SalesOrder.cs b/Visma.net/Models/SalesOrder.cs index 5c630b9..2027f85 100644 --- a/Visma.net/Models/SalesOrder.cs +++ b/Visma.net/Models/SalesOrder.cs @@ -476,6 +476,12 @@ public int contactId set => Set(value); } + public bool overrideNumberSeries + { + get => Get(); + set => Set(value); + } + public string GetIdentificator() { diff --git a/Visma.net/Models/SalesOrderLine.cs b/Visma.net/Models/SalesOrderLine.cs index d7ce0b8..cb8f7c8 100644 --- a/Visma.net/Models/SalesOrderLine.cs +++ b/Visma.net/Models/SalesOrderLine.cs @@ -275,10 +275,6 @@ public string externalLink get => Get(); set => Set(value); } - public bool overrideNumberSeries - { - get => Get(); - set => Set(value); - } + } } \ No newline at end of file From a88afe4c583907035ae35f3ba3f31bd9cedc9a12 Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Fri, 23 Sep 2022 11:53:18 +0200 Subject: [PATCH 05/37] Added fields to Inventory --- .../Models/CustomDto/CustomerGLAccountDto.cs | 5 ++- Visma.net/Models/Inventory.cs | 44 ++++++++++++------- Visma.net/Visma.net.csproj | 6 +-- 3 files changed, 34 insertions(+), 21 deletions(-) diff --git a/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs b/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs index f8bf5f2..b6a10c0 100644 --- a/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs +++ b/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs @@ -5,6 +5,7 @@ namespace ONIT.VismaNetApi.Models.CustomDto public class CustomerGLAccountDto { [JsonProperty] public GLAccountDetailsDto customerLedgerAccount { get; private set; } + [JsonProperty] public Subaccount customerLedgerSubAccount { get; private set; } [JsonProperty] public GLAccountDetailsDto salesAccount { get; private set; } [JsonProperty] public GLAccountDetailsDto salesEuAccount { get; private set; } @@ -13,7 +14,7 @@ public class CustomerGLAccountDto [JsonProperty] public GLAccountDetailsDto salesNonTaxableAccount { get; private set; } - [JsonProperty] public DescriptiveDto salesSubaccount { get; private set; } + [JsonProperty] public Subaccount salesSubaccount { get; private set; } } public class SupplierGLAccountDto @@ -27,7 +28,7 @@ public class SupplierGLAccountDto [JsonProperty] public GLAccountDetailsDto expenseEUAccount { get; private set; } [JsonProperty] public GLAccountDetailsDto expenseAccountImport { get; private set; } - [JsonProperty] public DescriptiveDto expenseSubaccount { get; private set; } + [JsonProperty] public Subaccount expenseSubaccount { get; private set; } } } \ No newline at end of file diff --git a/Visma.net/Models/Inventory.cs b/Visma.net/Models/Inventory.cs index 0c4535f..a3ef87e 100644 --- a/Visma.net/Models/Inventory.cs +++ b/Visma.net/Models/Inventory.cs @@ -103,25 +103,25 @@ public PostingClass postingClass set => Set(value); } - public DescriptiveDto defaultWarehouse - { - get => Get(); - set => Set(value); - } + public DescriptiveDto defaultWarehouse + { + get => Get(); + set => Set(value); + } - public DescriptiveDto defaultIssueFrom - { - get => Get(); - set => Set(value); - } + public DescriptiveDto defaultIssueFrom + { + get => Get(); + set => Set(value); + } - public DescriptiveDto defaultReceiptTo - { - get => Get(); - set => Set(value); - } + public DescriptiveDto defaultReceiptTo + { + get => Get(); + set => Set(value); + } - public string purchaseUnit + public string purchaseUnit { get => Get(); set => Set(value); @@ -133,6 +133,18 @@ public string salesUnit set => Set(value); } + public string body + { + get => Get(); + set => Set(value); + } + + public DescriptiveDto priceClass + { + get => Get(); + set => Set(value); + } + public InventoryStatus status { get => Get(); diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index 85c3e37..de078bf 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -4,7 +4,7 @@ Visma.net Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 - 4.0.3.3 + 4.0.3.7 netstandard2.0;net462;net6 Visma.net Copyright © ON IT AS 2014 - 2022 @@ -25,8 +25,8 @@ LICENSE.md on_it_logo.png README.md - 4.0.3.3 - 4.0.3.3 + 4.0.3.7 + 4.0.3.7 From 5fb6598a0fd1818c8bb398cf0c97af8e03fc0dbd Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Tue, 4 Oct 2022 11:17:54 +0200 Subject: [PATCH 06/37] Added supplier payment --- Visma.net/Models/SupplierPayment.cs | 60 +++++++++++++++++++++++ Visma.net/Models/SupplierPaymentLine.cs | 54 ++++++++++++++++++++ Visma.net/Visma.net.csproj | 6 +-- Visma.net/VismaNet.cs | 2 + Visma.net/lib/DAta/SupplierPaymentData.cs | 24 +++++++++ Visma.net/lib/VismaNetControllers.cs | 1 + 6 files changed, 144 insertions(+), 3 deletions(-) create mode 100644 Visma.net/Models/SupplierPayment.cs create mode 100644 Visma.net/Models/SupplierPaymentLine.cs create mode 100644 Visma.net/lib/DAta/SupplierPaymentData.cs diff --git a/Visma.net/Models/SupplierPayment.cs b/Visma.net/Models/SupplierPayment.cs new file mode 100644 index 0000000..7c29ca6 --- /dev/null +++ b/Visma.net/Models/SupplierPayment.cs @@ -0,0 +1,60 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using ONIT.VismaNetApi.Lib; +using ONIT.VismaNetApi.Models.CustomDto; +using ONIT.VismaNetApi.Models.Enums; +using System; +using System.Collections.Generic; + +namespace ONIT.VismaNetApi.Models +{ + public class SupplierPayment : DtoPaginatedProviderBase, IProvideIdentificator + { + public string type { get => Get(); set => Set(value); } + public string refNbr { get => Get("referenceNumber"); set => Set(value, "referenceNumber"); } + public string status { get; set; } + public bool hold { get => Get(); set => Set(value); } + public DateTime applicationDate { get => Get(); set => Set(value); } + public string applicationPeriod { get => Get(); set => Set(value); } + public string paymentRef { get => Get(); set => Set(value); } + public CustomerSummary supplier { get => Get(); set => Set(value); } + public LocationSummary location { get => Get(); set => Set(value); } + public PaymentMethod paymentMethod { get => Get(); set => Set(value); } + public string cashAccount { get => Get(); set => Set(value); } + //public string currency { get => Get(); set => Set(value); } + public string description { get => Get(); set => Set(value); } + public decimal paymentAmount { get => Get(); set => Set(value); } + [JsonProperty] + public decimal financeCharges { get => Get(); set => Set(value); } + [JsonProperty] + public decimal unappliedBalance { get => Get(); set => Set(value); } + [JsonProperty] + public decimal appliedAmount { get => Get(); set => Set(value); } + [JsonProperty] + public decimal deductedCharges { get; private set; } + [JsonProperty] + public bool released { get => Get(); set => Set(value); } + [JsonProperty] + public DateTime lastModifiedDateTime { get; private set; } + [JsonProperty] + public List paymentLines + { + get => Get(defaultValue: new List()); + private set => Set(value); + } + [JsonProperty] + public JObject extras { get; private set; } + public string errorInfo { get; set; } + + public string GetIdentificator() + { + return refNbr; + } + + internal override void PrepareForUpdate() + { + foreach (var line in this.paymentLines) + line.operation = ApiOperation.Update; + } + } +} diff --git a/Visma.net/Models/SupplierPaymentLine.cs b/Visma.net/Models/SupplierPaymentLine.cs new file mode 100644 index 0000000..302c832 --- /dev/null +++ b/Visma.net/Models/SupplierPaymentLine.cs @@ -0,0 +1,54 @@ +using Newtonsoft.Json; +using ONIT.VismaNetApi.Lib; +using ONIT.VismaNetApi.Models.Enums; +using System; + +namespace ONIT.VismaNetApi.Models +{ + public class SupplierPaymentLine : DtoProviderBase + { + public SupplierPaymentLine() + { + DtoFields.Add("operation", new NotDto(ApiOperation.Insert)); + } + public ApiOperation operation + { + get => Get(defaultValue: new NotDto(ApiOperation.Insert)).Value; + set => Set(new NotDto(value)); + } + public string documentType { get => Get(); set => Set(value); } + [JsonProperty] + public string branch { get; private set; } + [JsonProperty] + public string batchNumber { get; private set; } + public string refNbr { get => Get("invoiceRefNbr"); set => Set(value, "refNbr"); } + public decimal amountPaid { get => Get(); set => Set(value); } + public decimal cashDiscountTaken { get => Get(); set => Set(value); } + [JsonProperty] + public decimal withholdingTax { get => Get(); set => Set(value); } + [JsonProperty] + public DateTime applicationDate { get => Get(); set => Set(value); } + [JsonProperty] + public string applicationPeriod { get => Get(); set => Set(value); } + [JsonProperty] + public DateTime date { get => Get(); set => Set(value); } + [JsonProperty] + public DateTime dueDate { get => Get(); set => Set(value); } + [JsonProperty] + public DateTime cashDiscountDate { get => Get(); set => Set(value); } + [JsonProperty] + public decimal balance { get; private set; } + [JsonProperty] + public decimal cashDiscountBalance { get; private set; } + [JsonProperty] + public string description { get; private set; } + //[JsonProperty] + //public string currency { get; private set; } + [JsonProperty] + public string postPeriod { get; private set; } + [JsonProperty] + public string supplierRef { get; private set; } + public decimal crossRate { get => Get(); set => Set(value); } + } + +} diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index de078bf..9e61301 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -4,7 +4,7 @@ Visma.net Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 - 4.0.3.7 + 4.0.3.8 netstandard2.0;net462;net6 Visma.net Copyright © ON IT AS 2014 - 2022 @@ -25,8 +25,8 @@ LICENSE.md on_it_logo.png README.md - 4.0.3.7 - 4.0.3.7 + 4.0.3.8 + 4.0.3.8 diff --git a/Visma.net/VismaNet.cs b/Visma.net/VismaNet.cs index 6ccbb53..8798f7b 100644 --- a/Visma.net/VismaNet.cs +++ b/Visma.net/VismaNet.cs @@ -28,6 +28,7 @@ public class VismaNet : VismaNetDynamicHandler public readonly DimensionData Dimension; public readonly DiscountData Discount; public readonly SupplierInvoiceData SupplierInvoice; + public readonly SupplierPaymentData SupplierPayment; public readonly SupplierData Supplier; public readonly InventoryData Inventory; public readonly FinAccountData Account; @@ -86,6 +87,7 @@ public VismaNet(int companyId, string token, int branchId = 0) CustomerInvoice = new CustomerInvoiceData(Auth); Supplier = new SupplierData(Auth); SupplierInvoice = new SupplierInvoiceData(Auth); + SupplierPayment = new SupplierPaymentData(Auth); CashSale = new CashSaleData(Auth); CustomerDocument = new CustomerDocumentData(Auth); Dimension = new DimensionData(Auth); diff --git a/Visma.net/lib/DAta/SupplierPaymentData.cs b/Visma.net/lib/DAta/SupplierPaymentData.cs new file mode 100644 index 0000000..bc47f77 --- /dev/null +++ b/Visma.net/lib/DAta/SupplierPaymentData.cs @@ -0,0 +1,24 @@ +using ONIT.VismaNetApi.Models; +using System.Threading.Tasks; + +namespace ONIT.VismaNetApi.Lib.Data +{ + public class SupplierPaymentData : BasePaginatedCrudDataClass + { + internal SupplierPaymentData(VismaNetAuthorization auth) : base(auth) + { + ApiControllerUri = VismaNetControllers.SupplierPayment; + } + + protected SupplierPaymentData() : base(null) + { + ApiControllerUri = VismaNetControllers.SupplierPayment; + } + + public async Task Release(SupplierPayment payment) + { + return await VismaNetApiHelper.Action(Authorization, ApiControllerUri, payment.GetIdentificator(), "release", new { type = new DtoValue(payment.type) }); + } + + } +} diff --git a/Visma.net/lib/VismaNetControllers.cs b/Visma.net/lib/VismaNetControllers.cs index 69fe7a5..9e70df5 100644 --- a/Visma.net/lib/VismaNetControllers.cs +++ b/Visma.net/lib/VismaNetControllers.cs @@ -41,6 +41,7 @@ internal static class VismaNetControllers public const string Subaccount = "controller/api/v1/subaccount"; public const string Suppliers = "controller/api/v1/supplier"; public const string SupplierDocument = "controller/api/v1/supplierdocument"; + public const string SupplierPayment = "controller/api/v1/supplierpayment"; public const string Warehouse = "controller/api/v1/warehouse"; public const string SupplierInvoices = "controller/api/v1/supplierinvoice"; public const string InventoryIssue = "controller/api/v1/inventoryissue"; From 87ad8fcc5d416a5ed57f3538b172eced2694b675 Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Tue, 4 Oct 2022 14:08:18 +0200 Subject: [PATCH 07/37] FIx for packaging --- Visma.net/Models/Inventory.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Visma.net/Models/Inventory.cs b/Visma.net/Models/Inventory.cs index a3ef87e..57c5ba2 100644 --- a/Visma.net/Models/Inventory.cs +++ b/Visma.net/Models/Inventory.cs @@ -24,7 +24,6 @@ public Inventory(string _inventoryNumber) private List _crossReferences; private List _warehouseDetails; private List _supplierDetails; - private List _packaging; [JsonProperty] public List attachments From 2e9d45708ed0eb6fa862aeaf09faca23d5a56efc Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Tue, 4 Oct 2022 14:20:29 +0200 Subject: [PATCH 08/37] Removed Id from subaccount dto --- Visma.net/Models/CustomDto/Subaccount.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Visma.net/Models/CustomDto/Subaccount.cs b/Visma.net/Models/CustomDto/Subaccount.cs index d82f601..f189009 100644 --- a/Visma.net/Models/CustomDto/Subaccount.cs +++ b/Visma.net/Models/CustomDto/Subaccount.cs @@ -13,8 +13,6 @@ public class Subaccount : IProvideCustomDto [JsonProperty] public string description { get; private set; } [JsonProperty] - public int id { get; private set; } - [JsonProperty] public int subaccountId { get; private set; } [JsonProperty] public string lastModifiedDateTime { get; private set; } From d6c911109639aca69a48f2162c3dfd18de4f8cd4 Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Fri, 7 Oct 2022 15:24:45 +0200 Subject: [PATCH 09/37] Added currency to SupplierPayment --- Visma.net/Models/CustomDto/CurrencySummary.cs | 10 +++++++ Visma.net/Models/CustomDto/IdName.cs | 28 +++++++++++++++++++ Visma.net/Models/SupplierPayment.cs | 2 +- Visma.net/Models/SupplierPaymentLine.cs | 4 +-- Visma.net/Visma.net.csproj | 6 ++-- 5 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 Visma.net/Models/CustomDto/CurrencySummary.cs diff --git a/Visma.net/Models/CustomDto/CurrencySummary.cs b/Visma.net/Models/CustomDto/CurrencySummary.cs new file mode 100644 index 0000000..d4182d7 --- /dev/null +++ b/Visma.net/Models/CustomDto/CurrencySummary.cs @@ -0,0 +1,10 @@ +namespace ONIT.VismaNetApi.Models.CustomDto +{ + public class CurrencySummary : IdDescription + { + public string symbol { get; set; } + public bool isBaseCurrency { get; set; } + public int decimalPrecision { get; set; } + public bool isUsedForAccounting { get; set; } + } +} \ No newline at end of file diff --git a/Visma.net/Models/CustomDto/IdName.cs b/Visma.net/Models/CustomDto/IdName.cs index bfe847c..5afeb2d 100644 --- a/Visma.net/Models/CustomDto/IdName.cs +++ b/Visma.net/Models/CustomDto/IdName.cs @@ -31,6 +31,34 @@ public DtoValue ToDto() } } + public class IdDescription : IBecomeDto + { + public IdDescription() + { + + } + + public IdDescription(string id) + { + this.id = id; + } + + public string id { get; set; } + + [JsonProperty] + public string descriptuin { get; private set; } + + public static implicit operator IdDescription(string id) + { + return new IdDescription(id); + } + + public DtoValue ToDto() + { + return new DtoValue(id); + } + } + public class IdValue : IBecomeDto { public IdValue() diff --git a/Visma.net/Models/SupplierPayment.cs b/Visma.net/Models/SupplierPayment.cs index 7c29ca6..d3acde5 100644 --- a/Visma.net/Models/SupplierPayment.cs +++ b/Visma.net/Models/SupplierPayment.cs @@ -21,7 +21,7 @@ public class SupplierPayment : DtoPaginatedProviderBase, IProvideIdentificator public LocationSummary location { get => Get(); set => Set(value); } public PaymentMethod paymentMethod { get => Get(); set => Set(value); } public string cashAccount { get => Get(); set => Set(value); } - //public string currency { get => Get(); set => Set(value); } + public CurrencySummary currency { get => Get(); set => Set(value); } public string description { get => Get(); set => Set(value); } public decimal paymentAmount { get => Get(); set => Set(value); } [JsonProperty] diff --git a/Visma.net/Models/SupplierPaymentLine.cs b/Visma.net/Models/SupplierPaymentLine.cs index 302c832..89a07e6 100644 --- a/Visma.net/Models/SupplierPaymentLine.cs +++ b/Visma.net/Models/SupplierPaymentLine.cs @@ -42,8 +42,8 @@ public ApiOperation operation public decimal cashDiscountBalance { get; private set; } [JsonProperty] public string description { get; private set; } - //[JsonProperty] - //public string currency { get; private set; } + [JsonProperty] + public string currency { get; private set; } [JsonProperty] public string postPeriod { get; private set; } [JsonProperty] diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index 9e61301..9f21b5d 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -4,7 +4,7 @@ Visma.net Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 - 4.0.3.8 + 4.0.3.10 netstandard2.0;net462;net6 Visma.net Copyright © ON IT AS 2014 - 2022 @@ -25,8 +25,8 @@ LICENSE.md on_it_logo.png README.md - 4.0.3.8 - 4.0.3.8 + 4.0.3.10 + 4.0.3.10 From 6112f968dd13f8bfbd5ad523eac36167bfc65565 Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Tue, 13 Dec 2022 09:45:48 +0100 Subject: [PATCH 10/37] Added cashAccount supplierInvoice --- Visma.net/Models/SupplierInvoice.cs | 6 ++++++ Visma.net/Visma.net.csproj | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Visma.net/Models/SupplierInvoice.cs b/Visma.net/Models/SupplierInvoice.cs index 973e829..bf13e9f 100644 --- a/Visma.net/Models/SupplierInvoice.cs +++ b/Visma.net/Models/SupplierInvoice.cs @@ -251,6 +251,12 @@ public string referenceNumber set => Set(value); } + public string cashAccount + { + get => Get(); + set => Set(value); + } + [JsonProperty] public decimal roundingDiff { get; private set; } [JsonProperty] public decimal roundingDiffInCurrency { get; private set; } diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index 9f21b5d..8e4822d 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -4,7 +4,7 @@ Visma.net Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 - 4.0.3.10 + 4.0.3.11 netstandard2.0;net462;net6 Visma.net Copyright © ON IT AS 2014 - 2022 @@ -25,8 +25,8 @@ LICENSE.md on_it_logo.png README.md - 4.0.3.10 - 4.0.3.10 + 4.0.3.11 + 4.0.3.11 From c6e4906fbf3d10873e930b078af77273f960fd96 Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Tue, 13 Dec 2022 13:38:57 +0100 Subject: [PATCH 11/37] Added InventoryUnits --- Visma.net/Models/CustomDto/InventoryUnit.cs | 22 +++++++++++++++++++++ Visma.net/Models/Inventory.cs | 7 +++++++ Visma.net/Visma.net.csproj | 2 +- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 Visma.net/Models/CustomDto/InventoryUnit.cs diff --git a/Visma.net/Models/CustomDto/InventoryUnit.cs b/Visma.net/Models/CustomDto/InventoryUnit.cs new file mode 100644 index 0000000..1e296a9 --- /dev/null +++ b/Visma.net/Models/CustomDto/InventoryUnit.cs @@ -0,0 +1,22 @@ +using System; +using Newtonsoft.Json; + +namespace ONIT.VismaNetApi.Models.CustomDto +{ + public class InventoryUnit + { + public int unitType { get; set; } + public ItemClass itemClass { get; set; } + public int inventoryID { get; set; } + public string toUnit { get; set; } + public string sampleToUnit { get; set; } + public string fromUnit { get; set; } + public string unitMultDiv { get; set; } + public decimal unitRate { get; set; } + public decimal priceAdjustmentMultiplier { get; set; } + public int recordID { get; set; } + + + + } +} diff --git a/Visma.net/Models/Inventory.cs b/Visma.net/Models/Inventory.cs index 57c5ba2..ddea572 100644 --- a/Visma.net/Models/Inventory.cs +++ b/Visma.net/Models/Inventory.cs @@ -24,6 +24,7 @@ public Inventory(string _inventoryNumber) private List _crossReferences; private List _warehouseDetails; private List _supplierDetails; + private List _inventoryUnits; [JsonProperty] public List attachments @@ -174,6 +175,12 @@ public List supplierDetails get => _supplierDetails ?? (_supplierDetails = new List()); private set => _supplierDetails = value; } + [JsonProperty] + public List inventoryUnits + { + get => _inventoryUnits ?? (_inventoryUnits = new List()); + private set => _inventoryUnits = value; + } public Packaging packaging { diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index 8e4822d..8048956 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -4,7 +4,7 @@ Visma.net Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 - 4.0.3.11 + 4.1.0.1 netstandard2.0;net462;net6 Visma.net Copyright © ON IT AS 2014 - 2022 From 647d0e514afa966f87e2ec34430a3d7c24b2d78c Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Mon, 19 Dec 2022 09:47:54 +0100 Subject: [PATCH 12/37] Fixes for BAccount in location. --- Visma.net/Models/Location.cs | 26 +++++++++++++------------- Visma.net/Visma.net.csproj | 2 +- Visma.net/lib/Data/LocationData.cs | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Visma.net/Models/Location.cs b/Visma.net/Models/Location.cs index e7806c0..30eec73 100644 --- a/Visma.net/Models/Location.cs +++ b/Visma.net/Models/Location.cs @@ -10,9 +10,9 @@ public class Location : DtoPaginatedProviderBase, IProvideIdentificator { public Location(string baccountId, string locationId, bool standAloneLocation = false) { - //this.baccount = new Baccount(); - //this.baccount.number = baccountId; - this.baccountId = baccountId; + this.baccount = new Baccount(); + this.baccount.number = baccountId; + //this.baccountId = baccountId; this.locationId = locationId; @@ -51,18 +51,18 @@ public bool addressIsSameAsMain set => Set(value); } - //public Baccount baccount - //{ - // get => Get("baccountId"); - // set => Set(value, "baccountId"); - //} - - public string baccountId + public Baccount baccount { - get => Get(); - set => Set(value); + get => Get("baccountId"); + set => Set(value, "baccountId"); } + //public string baccountId + //{ + // get => Get(); + // set => Set(value); + //} + public ContactInfo contact { get => Get(); @@ -128,7 +128,7 @@ public VatZone vatZone public string GetIdentificator() { - return baccountId;// baccount?.number; + return baccount?.number; } } } \ No newline at end of file diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index 8048956..a010ce5 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -4,7 +4,7 @@ Visma.net Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 - 4.1.0.1 + 4.1.0.2 netstandard2.0;net462;net6 Visma.net Copyright © ON IT AS 2014 - 2022 diff --git a/Visma.net/lib/Data/LocationData.cs b/Visma.net/lib/Data/LocationData.cs index 24e1730..c9eeaf0 100644 --- a/Visma.net/lib/Data/LocationData.cs +++ b/Visma.net/lib/Data/LocationData.cs @@ -32,7 +32,7 @@ public virtual async Task Add(Location entity) public virtual async Task Update(Location entity) { entity.InternalPrepareForUpdate(); - await VismaNetApiHelper.Update(entity, $"{entity.baccountId.Trim()}/{entity.locationId.Trim()}", ApiControllerUri, Authorization); + await VismaNetApiHelper.Update(entity, $"{entity.baccount.number.Trim()}/{entity.locationId.Trim()}", ApiControllerUri, Authorization); //await VismaNetApiHelper.Update(entity, $"{entity.baccount.number.Trim()}/{entity.locationId.Trim()}", ApiControllerUri, Authorization); } From f21d7ef594b517bfd865d05d9ade9d6e16eda2b3 Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Mon, 19 Dec 2022 10:12:43 +0100 Subject: [PATCH 13/37] Fix subaccount problem with test --- .../Models/CustomDto/CustomerGLAccountDto.cs | 4 +- Visma.net/Models/CustomDto/Subaccount.cs | 2 + .../Models/CustomDto/SubaccountGlAccount.cs | 75 +++++++++++++++++++ 3 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 Visma.net/Models/CustomDto/SubaccountGlAccount.cs diff --git a/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs b/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs index b6a10c0..c29b50e 100644 --- a/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs +++ b/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs @@ -5,7 +5,7 @@ namespace ONIT.VismaNetApi.Models.CustomDto public class CustomerGLAccountDto { [JsonProperty] public GLAccountDetailsDto customerLedgerAccount { get; private set; } - [JsonProperty] public Subaccount customerLedgerSubAccount { get; private set; } + [JsonProperty] public SubaccountGlAccount customerLedgerSubAccount { get; private set; } [JsonProperty] public GLAccountDetailsDto salesAccount { get; private set; } [JsonProperty] public GLAccountDetailsDto salesEuAccount { get; private set; } @@ -28,7 +28,7 @@ public class SupplierGLAccountDto [JsonProperty] public GLAccountDetailsDto expenseEUAccount { get; private set; } [JsonProperty] public GLAccountDetailsDto expenseAccountImport { get; private set; } - [JsonProperty] public Subaccount expenseSubaccount { get; private set; } + [JsonProperty] public SubaccountGlAccount expenseSubaccount { get; private set; } } } \ No newline at end of file diff --git a/Visma.net/Models/CustomDto/Subaccount.cs b/Visma.net/Models/CustomDto/Subaccount.cs index f189009..d82f601 100644 --- a/Visma.net/Models/CustomDto/Subaccount.cs +++ b/Visma.net/Models/CustomDto/Subaccount.cs @@ -13,6 +13,8 @@ public class Subaccount : IProvideCustomDto [JsonProperty] public string description { get; private set; } [JsonProperty] + public int id { get; private set; } + [JsonProperty] public int subaccountId { get; private set; } [JsonProperty] public string lastModifiedDateTime { get; private set; } diff --git a/Visma.net/Models/CustomDto/SubaccountGlAccount.cs b/Visma.net/Models/CustomDto/SubaccountGlAccount.cs new file mode 100644 index 0000000..65c146d --- /dev/null +++ b/Visma.net/Models/CustomDto/SubaccountGlAccount.cs @@ -0,0 +1,75 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using ONIT.VismaNetApi.Lib; +using System.Collections.Generic; +using System.Linq; + +namespace ONIT.VismaNetApi.Models.CustomDto +{ + public class SubaccountGlAccount : IProvideCustomDto + { + private List _segments; + + [JsonProperty] + public string description { get; private set; } + [JsonProperty] + public int subaccountId { get; private set; } + [JsonProperty] + public string lastModifiedDateTime { get; private set; } + + [JsonProperty] public string subaccountNumber { get; private set; } + + [JsonProperty] + public List segments + { + get => _segments ?? (_segments = new List()); + private set => _segments = value; + } + [JsonProperty] + public string errorInfo { get; private set; } + + [JsonProperty] + public bool active { get; private set; } + + [JsonProperty] + public JObject extras { get; private set; } + + [JsonProperty] + public MetaData metadata { get; private set; } + + /// + /// Sets a segment (department, project) for an invoice line. Remember that you have to set ALL segments for a line. + /// + /// + /// + public string this[int segmentId] + { + get + { + if (segments == null || segments.Count == 0 || segments.All(x => x.segmentId != segmentId)) + return string.Empty; + var firstOrDefault = segments.FirstOrDefault(x => x.segmentId == segmentId); + if (firstOrDefault != null) + return firstOrDefault.segmentValue; + return string.Empty; + } + set + { + var firstOrDefault = segments.FirstOrDefault(x => x.segmentId == segmentId); + if (firstOrDefault != null) + { + firstOrDefault.segmentValue = value; + } + else + { + segments.Add(new Segment { segmentId = segmentId, segmentValue = value }); + } + } + } + + public object ToDto() + { + return segments.Select(x => new { x.segmentId, x.segmentValue }); + } + } +} \ No newline at end of file From 7a8634d1a9c2aa9c8e2a3e7530b0f6de4a2fb8ec Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Mon, 19 Dec 2022 12:03:36 +0100 Subject: [PATCH 14/37] Fixes for test after changes and additions --- Visma.net.Tests/CustomerTest.cs | 2 +- ...erTest.CanDeserializeToEntity.verified.txt | 3 +- ...nTests.CanDeserializeToEntity.verified.txt | 4 +- ...rTests.CanDeserializeToEntity.verified.txt | 1 + ...lierTests.CanDeserializeToDto.verified.txt | 22 +++++++++ ...rTests.CanDeserializeToEntity.verified.txt | 4 +- .../Models/CustomDto/CustomerGLAccountDto.cs | 49 ++++++++++++++----- .../Models/CustomDto/GLAccountDetailsDto.cs | 14 ++++-- Visma.net/Models/CustomDto/IdName.cs | 3 +- Visma.net/Models/Supplier.cs | 5 +- 10 files changed, 83 insertions(+), 24 deletions(-) diff --git a/Visma.net.Tests/CustomerTest.cs b/Visma.net.Tests/CustomerTest.cs index 74be6a9..399a2b9 100644 --- a/Visma.net.Tests/CustomerTest.cs +++ b/Visma.net.Tests/CustomerTest.cs @@ -221,7 +221,7 @@ public class CustomerTest : EntityBaseTest ""description"": ""string"" }, ""salesSubaccount"": { - ""id"": ""string"", + ""subaccountNumber"": ""string"", ""description"": ""string"" } }, diff --git a/Visma.net.Tests/Snapshots/CustomerTest.CanDeserializeToEntity.verified.txt b/Visma.net.Tests/Snapshots/CustomerTest.CanDeserializeToEntity.verified.txt index 77f1380..049e987 100644 --- a/Visma.net.Tests/Snapshots/CustomerTest.CanDeserializeToEntity.verified.txt +++ b/Visma.net.Tests/Snapshots/CustomerTest.CanDeserializeToEntity.verified.txt @@ -92,7 +92,8 @@ }, salesSubaccount: { description: string, - id: string + subaccountNumber: string, + active: false } }, invoiceAddress: { diff --git a/Visma.net.Tests/Snapshots/LocationTests.CanDeserializeToEntity.verified.txt b/Visma.net.Tests/Snapshots/LocationTests.CanDeserializeToEntity.verified.txt index 4513f46..0b9982a 100644 --- a/Visma.net.Tests/Snapshots/LocationTests.CanDeserializeToEntity.verified.txt +++ b/Visma.net.Tests/Snapshots/LocationTests.CanDeserializeToEntity.verified.txt @@ -19,7 +19,9 @@ } }, addressIsSameAsMain: true, - baccountId: string, + baccount: { + number: string + }, contact: { attention: string, email: string, diff --git a/Visma.net.Tests/Snapshots/SalesOrderTests.CanDeserializeToEntity.verified.txt b/Visma.net.Tests/Snapshots/SalesOrderTests.CanDeserializeToEntity.verified.txt index 0188286..025c433 100644 --- a/Visma.net.Tests/Snapshots/SalesOrderTests.CanDeserializeToEntity.verified.txt +++ b/Visma.net.Tests/Snapshots/SalesOrderTests.CanDeserializeToEntity.verified.txt @@ -233,5 +233,6 @@ description: string, id: string }, + overrideNumberSeries: false, metadata: {} } \ No newline at end of file diff --git a/Visma.net.Tests/Snapshots/SupplierTests.CanDeserializeToDto.verified.txt b/Visma.net.Tests/Snapshots/SupplierTests.CanDeserializeToDto.verified.txt index e6119a7..1822601 100644 --- a/Visma.net.Tests/Snapshots/SupplierTests.CanDeserializeToDto.verified.txt +++ b/Visma.net.Tests/Snapshots/SupplierTests.CanDeserializeToDto.verified.txt @@ -33,6 +33,28 @@ documentLanguage: { Value: string }, + glAccounts: { + Value: { + expenseAccount: { + Value: string + }, + expenseAccountImport: { + Value: string + }, + expenseAccountNonTax: { + Value: string + }, + expenseEUAccount: { + Value: string + }, + expenseSubaccount: { + Value: string + }, + supplierAccount: { + Value: string + } + } + }, mainAddress: { Value: { addressLine1: { diff --git a/Visma.net.Tests/Snapshots/SupplierTests.CanDeserializeToEntity.verified.txt b/Visma.net.Tests/Snapshots/SupplierTests.CanDeserializeToEntity.verified.txt index e812a65..dfc9b1a 100644 --- a/Visma.net.Tests/Snapshots/SupplierTests.CanDeserializeToEntity.verified.txt +++ b/Visma.net.Tests/Snapshots/SupplierTests.CanDeserializeToEntity.verified.txt @@ -45,8 +45,8 @@ type: string }, expenseSubaccount: { - description: string, - id: string + id: string, + description: string } }, lastModifiedDateTime: DateTime_1, diff --git a/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs b/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs index c29b50e..ee5c28c 100644 --- a/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs +++ b/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs @@ -1,4 +1,6 @@ using Newtonsoft.Json; +using ONIT.VismaNetApi.Interfaces; +using ONIT.VismaNetApi.Lib; namespace ONIT.VismaNetApi.Models.CustomDto { @@ -14,21 +16,44 @@ public class CustomerGLAccountDto [JsonProperty] public GLAccountDetailsDto salesNonTaxableAccount { get; private set; } - [JsonProperty] public Subaccount salesSubaccount { get; private set; } + [JsonProperty] public SubaccountGlAccount salesSubaccount { get; private set; } } - public class SupplierGLAccountDto + public class SupplierGLAccountDto : DtoProviderBase { - [JsonProperty] public GLAccountDetailsDto supplierAccount { get; private set; } - - [JsonProperty] public GLAccountDetailsDto expenseAccount { get; private set; } - - [JsonProperty] public GLAccountDetailsDto expenseAccountNonTax { get; private set; } - - [JsonProperty] public GLAccountDetailsDto expenseEUAccount { get; private set; } - [JsonProperty] public GLAccountDetailsDto expenseAccountImport { get; private set; } - - [JsonProperty] public SubaccountGlAccount expenseSubaccount { get; private set; } + [JsonProperty] public GLAccountDetailsDto supplierAccount { + get => Get(); + private set => Set(value); + } + + [JsonProperty] public GLAccountDetailsDto expenseAccount { + get => Get(); + private set => Set(value); + } + + [JsonProperty] public GLAccountDetailsDto expenseAccountNonTax { + get => Get(); + private set => Set(value); + } + + [JsonProperty] public GLAccountDetailsDto expenseEUAccount { + get => Get(); + private set => Set(value); + } + [JsonProperty] public GLAccountDetailsDto expenseAccountImport { + get => Get(); + private set => Set(value); + } + + [JsonProperty] public IdDescription expenseSubaccount { + get => Get(); + private set => Set(value); + } + + public DtoValue ToDto() + { + return new DtoValue(this); + } } } \ No newline at end of file diff --git a/Visma.net/Models/CustomDto/GLAccountDetailsDto.cs b/Visma.net/Models/CustomDto/GLAccountDetailsDto.cs index 2b5233b..e0cf60d 100644 --- a/Visma.net/Models/CustomDto/GLAccountDetailsDto.cs +++ b/Visma.net/Models/CustomDto/GLAccountDetailsDto.cs @@ -1,13 +1,19 @@ using Newtonsoft.Json; +using ONIT.VismaNetApi.Interfaces; namespace ONIT.VismaNetApi.Models.CustomDto { - public class GLAccountDetailsDto + public class GLAccountDetailsDto : IBecomeDto { - [JsonProperty] public string description { get; private set; } + public string description { get; private set; } - [JsonProperty] public string number { get; private set; } + public string number { get; set; } - [JsonProperty] public string type { get; private set; } + public string type { get; private set; } + + public DtoValue ToDto() + { + return new DtoValue(number); + } } } \ No newline at end of file diff --git a/Visma.net/Models/CustomDto/IdName.cs b/Visma.net/Models/CustomDto/IdName.cs index 5afeb2d..14566ef 100644 --- a/Visma.net/Models/CustomDto/IdName.cs +++ b/Visma.net/Models/CustomDto/IdName.cs @@ -45,8 +45,7 @@ public IdDescription(string id) public string id { get; set; } - [JsonProperty] - public string descriptuin { get; private set; } + public string description { get; private set; } public static implicit operator IdDescription(string id) { diff --git a/Visma.net/Models/Supplier.cs b/Visma.net/Models/Supplier.cs index e0ea56c..56c5489 100644 --- a/Visma.net/Models/Supplier.cs +++ b/Visma.net/Models/Supplier.cs @@ -88,7 +88,10 @@ public string documentLanguage [JsonProperty] public JObject extras { get; private set; } - [JsonProperty] public SupplierGLAccountDto glAccounts { get; private set; } + public SupplierGLAccountDto glAccounts { + get => Get(); + set => Set(value); + } [JsonProperty] public int internalId From 38813cf75311004970d0a8899728603d97d54e37 Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Mon, 19 Dec 2022 13:49:32 +0100 Subject: [PATCH 15/37] Fixes for tests --- Visma.net/Models/CustomDto/GLAccountDetailsDto.cs | 4 ++-- Visma.net/Models/CustomDto/IdName.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Visma.net/Models/CustomDto/GLAccountDetailsDto.cs b/Visma.net/Models/CustomDto/GLAccountDetailsDto.cs index e0cf60d..06e7bb0 100644 --- a/Visma.net/Models/CustomDto/GLAccountDetailsDto.cs +++ b/Visma.net/Models/CustomDto/GLAccountDetailsDto.cs @@ -5,11 +5,11 @@ namespace ONIT.VismaNetApi.Models.CustomDto { public class GLAccountDetailsDto : IBecomeDto { - public string description { get; private set; } + public string description { get; set; } public string number { get; set; } - public string type { get; private set; } + public string type { get; set; } public DtoValue ToDto() { diff --git a/Visma.net/Models/CustomDto/IdName.cs b/Visma.net/Models/CustomDto/IdName.cs index 14566ef..9f5298f 100644 --- a/Visma.net/Models/CustomDto/IdName.cs +++ b/Visma.net/Models/CustomDto/IdName.cs @@ -45,7 +45,7 @@ public IdDescription(string id) public string id { get; set; } - public string description { get; private set; } + public string description { get; set; } public static implicit operator IdDescription(string id) { From 29325543ee96b629acddb2f7547319830f143345 Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Thu, 22 Dec 2022 11:13:34 +0100 Subject: [PATCH 16/37] Added helperfunction to get token from Visma connect --- Visma.net/VismaNet.cs | 6 ++++++ Visma.net/lib/VismaNetApiHelper.cs | 17 +++++++++++++++++ Visma.net/lib/VismaNetControllers.cs | 3 +++ 3 files changed, 26 insertions(+) diff --git a/Visma.net/VismaNet.cs b/Visma.net/VismaNet.cs index 96915cd..4a39152 100644 --- a/Visma.net/VismaNet.cs +++ b/Visma.net/VismaNet.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.IO; using System.Net.Http; +using System.Net.Sockets; using System.Reflection; using System.Runtime.InteropServices; using System.Threading.Tasks; @@ -209,6 +210,11 @@ public static async Task GetTokenUsingOAuth(string client_id, string cli { return await VismaNetApiHelper.GetTokenOAuth(client_id, client_secret, code, redirect_uri); } + public static async Task GetTokenFromVismaConnect(string clientId, string secret, string tenant_id, string scope = "vismanet_erp_service_api:create vismanet_erp_service_api:delete vismanet_erp_service_api:read vismanet_erp_service_api:update") + { + return await VismaNetApiHelper.GetTokenFromVismaConnect(clientId,secret,tenant_id,scope); + } + public static async Task> GetContextsForToken(string token) { return await VismaNetApiHelper.GetContextsForToken(token); diff --git a/Visma.net/lib/VismaNetApiHelper.cs b/Visma.net/lib/VismaNetApiHelper.cs index f04a2d5..4df637b 100644 --- a/Visma.net/lib/VismaNetApiHelper.cs +++ b/Visma.net/lib/VismaNetApiHelper.cs @@ -579,6 +579,23 @@ internal static async Task GetTokenOAuth(string clientId, string secret, return data["token"].Value(); } } + internal static async Task GetTokenFromVismaConnect(string clientId, string secret, string tenant_id, string scope = "vismanet_erp_service_api:create vismanet_erp_service_api:delete vismanet_erp_service_api:read vismanet_erp_service_api:update") + { + var webclient = GetHttpClient(new VismaNetAuthorization()); + { + var url = VismaNetControllers.VismaConnectToken; + var content = new FormUrlEncodedContent(new[] + { + new KeyValuePair("client_id", clientId), + new KeyValuePair("client_secret", secret), + new KeyValuePair("tenant_id", tenant_id), + new KeyValuePair("scope", scope), + new KeyValuePair("grant_type", "client_credentials") + }); + var data = await webclient.PostMessage(url, content); + return data["access_token"].Value(); + } + } internal static async Task InvoiceAction(string invoiceNumber, string action, VismaNetAuthorization authorization) diff --git a/Visma.net/lib/VismaNetControllers.cs b/Visma.net/lib/VismaNetControllers.cs index d6626ec..2ac24ea 100644 --- a/Visma.net/lib/VismaNetControllers.cs +++ b/Visma.net/lib/VismaNetControllers.cs @@ -5,6 +5,9 @@ internal static class VismaNetControllers // Security public const string Token = "security/api/v2/token"; + // Visma Connect + public const string VismaConnectToken = "https://connect.visma.com/connect/token"; + // Financials public const string Attribute = "controller/api/v1/attribute"; public const string Attachment = "controller/api/v1/attachment"; From cc55c1b01f13985e8e48e0681141982157ce1287 Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Tue, 7 Mar 2023 13:28:01 +0100 Subject: [PATCH 17/37] Inital version with salesorder V3 --- Visma.net.SalesOrder.nswag | 100 + Visma.net/Exceptions/VismaConnectException.cs | 20 + Visma.net/Models/CustomerPayment.cs | 1 + .../Models/Helpers/VismaNetAuthorization.cs | 10 +- Visma.net/Models/SupplierPayment.cs | 1 + .../ClientSalesOrderV3.Extensions.cs | 223 ++ Visma.net/SalesOrderV3/ClientSalesOrderV3.cs | 2485 +++++++++++++ .../VismaNetExceptionClientIdMissing.cs | 13 + .../Extensions/SalesOrderExtensions.cs | 321 ++ .../SalesOrderV3/Helpers/SalesOrderHelper.cs | 17 + Visma.net/SalesOrderV3/Models/Contracts.cs | 3297 +++++++++++++++++ Visma.net/Visma.net.csproj | 8 +- Visma.net/VismaNet.cs | 17 +- Visma.net/lib/Data/SalesOrderData.cs | 2 +- Visma.net/lib/VismaConnectToken.cs | 10 + Visma.net/lib/VismaNetApiHelper.cs | 20 +- Visma.net/lib/VismaNetControllers.cs | 3 + Visma.net/lib/VismaNetWebClient.cs | 52 +- 18 files changed, 6582 insertions(+), 18 deletions(-) create mode 100644 Visma.net.SalesOrder.nswag create mode 100644 Visma.net/Exceptions/VismaConnectException.cs create mode 100644 Visma.net/SalesOrderV3/ClientSalesOrderV3.Extensions.cs create mode 100644 Visma.net/SalesOrderV3/ClientSalesOrderV3.cs create mode 100644 Visma.net/SalesOrderV3/Exceptions/VismaNetExceptionClientIdMissing.cs create mode 100644 Visma.net/SalesOrderV3/Extensions/SalesOrderExtensions.cs create mode 100644 Visma.net/SalesOrderV3/Helpers/SalesOrderHelper.cs create mode 100644 Visma.net/SalesOrderV3/Models/Contracts.cs create mode 100644 Visma.net/lib/VismaConnectToken.cs diff --git a/Visma.net.SalesOrder.nswag b/Visma.net.SalesOrder.nswag new file mode 100644 index 0000000..d436259 --- /dev/null +++ b/Visma.net.SalesOrder.nswag @@ -0,0 +1,100 @@ +{ + "runtime": "WinX64", + "defaultVariables": null, + "documentGenerator": { + "fromDocument": { + "json": "{\r\n \"openapi\": \"3.0.1\",\r\n \"info\": {\r\n \"title\": \"Visma.net.ERP.SalesOrders.Api\",\r\n \"version\": \"1.0.14.388\"\r\n },\r\n \"servers\": [\r\n {\r\n \"url\": \"/\"\r\n }\r\n ],\r\n \"paths\": {\r\n \"/api/v3/Customers\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"Customers\"\r\n ],\r\n \"summary\": \"Gets a list of customers\",\r\n \"description\": \"Sample request:\\r\\n \\r\\nGET /customers?filter=visma&pageSize=10\",\r\n \"operationId\": \"Customers_GetList_\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"filter\",\r\n \"in\": \"query\",\r\n \"description\": \"An optional text string to find customers matching (searching fields id, name, gln, tax registration id). If not specified all customers are returned.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of customers retrieved per page. If not specified, the default value of 100 will be used.\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 100\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"The zero based page index to retrieve\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 0\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Returns the list of customers found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/CustomerDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/CustomerDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/CustomerDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If pageSize or pageIndex is not within the allowed range\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/Customers/{customerId}/locations\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"Customers\"\r\n ],\r\n \"summary\": \"Gets a list of locations for the specified customer\",\r\n \"description\": \"Sample rquest:\\r\\n \\r\\nGET /customers/10000/locations\",\r\n \"operationId\": \"Customers_GetCustomerLocationList_customerIdlocations\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"customerId\",\r\n \"in\": \"path\",\r\n \"description\": \"The customer id (CustomerCd) to retrieve locations for\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"List of locations for the specified customer\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationItemDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationItemDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationItemDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If customer with id customerId is not found or is not accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/Inventory\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"Inventory\"\r\n ],\r\n \"summary\": \"Gets an inventory summary for inventory items.\",\r\n \"description\": \"Sample request:\\r\\n \\r\\nGET /inventory?inventoryId=Item1\\r\\n \\r\\nGET /inventory?warehouseId=MAIN&modifiedSince=2021-08-01T12:00:00&pageSize=1000\\r\\n \\r\\nGET /inventory?inventoryId=Item1&InventoryId=Item2&expand=location,attribute\\r\\n \\r\\nGET /inventory?expand=location&attributeFilter=WEBSHOP:1\",\r\n \"operationId\": \"Inventory_GetList_\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"inventoryId\",\r\n \"in\": \"query\",\r\n \"description\": \"A list of zero or more inventory items to get a summary for. If no inventoryId is passed, all inventory items will be included in the response.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"warehouseId\",\r\n \"in\": \"query\",\r\n \"description\": \"A list of zero or more warehouses to get a summary for. If no warehouse is supplied, all warehouses will be included in the response.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"locationId\",\r\n \"in\": \"query\",\r\n \"description\": \"A list of zero or more locations to get a summary for. If no location is supplied, all locations will be included in the response.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"expand\",\r\n \"in\": \"query\",\r\n \"description\": \"An additional option to include location detail information with the warehouse summary, or attribute details for the inventory item. If this is not supplied, location information or attributes will not be included in the response.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/InventoryAvailabilityExpansions\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"modifiedSince\",\r\n \"in\": \"query\",\r\n \"description\": \"A date/time value for filtering when an inventory item's warehouse or location availability last changed\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n {\r\n \"name\": \"attributeFilter\",\r\n \"in\": \"query\",\r\n \"description\": \"One or more attribute filter values specified as attribute-id:attribute-value. For example \\\"attributeFilter=WEBSHOP:1&attributeFilter=AnotherAttribute:someValue\\\"\\r\\nIf two attributeFilter values have the same attribute-Id either one need to match.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of inventory items retrieved per page. If not specified the default pagesize is 10000 items per page\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"Gets or sets the zero based page index to get\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Returns list of inventory items found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/InventoryItemAvailabilityDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/InventoryItemAvailabilityDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/InventoryItemAvailabilityDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If modifiedSince is an invalid date, if expand contains an invalid value, or if any of the supplied attributeFilter(s) are invalid\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets information about a single sales order\",\r\n \"description\": \"The expand query parameter corresponds to sections in the Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDto.\\r\\nIf an expand value is not specified it will not be filled and returned in the response object.\\r\\n \\r\\nSample request:\\r\\n \\r\\n`GET /salesorders/SO/000100?expand=customer,payment`\",\r\n \"operationId\": \"SalesOrders_GetItemAsync_typeorderId\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"expand\",\r\n \"in\": \"query\",\r\n \"description\": \"An optional specification of what details to include about the sales order. The default value if not supplied is \\\"None\\\"\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderExpansions\"\r\n }\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDto\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDto\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDto\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"patch\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Make modifications to an existing sales order\",\r\n \"description\": \"If-Match header represents a version of Sales Order to be modified and must be included in request.\\r\\nValue of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header.\",\r\n \"operationId\": \"SalesOrders_Patch_typeorderId\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of the order to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The order number to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"requestBody\": {\r\n \"description\": \"Data to change about the sales order\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderCommand\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderCommand\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderCommand\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The order was modified successfully\"\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in command is outside the allowed range\\r\\n See #/components/x-visma-erp-error-codes for the full list of error codes.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"The order specified was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"412\": {\r\n \"description\": \"Order version does not match with If-Match header\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"428\": {\r\n \"description\": \"If-Match header was not supplied\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"409\": {\r\n \"description\": \"Conflict\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"delete\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Delete an existing sales order\",\r\n \"description\": \"Sample requests:\\r\\n \\r\\n```\\r\\nDELETE /salesorders/SO/012345\\r\\n```\",\r\n \"operationId\": \"SalesOrders_Delete_typeorderId\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of the order to delete\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The order number to delete\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The order was deleted successfully\"\r\n },\r\n \"400\": {\r\n \"description\": \"Bad Request\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Specified order was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets a paged list with sales orders of a specific type\",\r\n \"description\": \"Sample requests:\\r\\n \\r\\n`GET /salesorders/SO`\\r\\n \\r\\n`GET /salesorders/SO?customerId=10000&status=Open&pageSize=10`\\r\\n \\r\\n`GET /salesorders/SO?orderBy=created%20desc`\",\r\n \"operationId\": \"SalesOrders_GetList_type\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales orders to get.\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"customerId\",\r\n \"in\": \"query\",\r\n \"description\": \"The customer for which to retrieve orders. If omitted or empty, orders for all customers are included\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"status\",\r\n \"in\": \"query\",\r\n \"description\": \"The order status to include in the result. If omitted or empty, orders with any status are included.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"modifiedSince\",\r\n \"in\": \"query\",\r\n \"description\": \"A date/time value for filtering when a sales order last changed.\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of customers retrieved per page\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 100\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"The zero based page index to retrieve\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 0\r\n }\r\n },\r\n {\r\n \"name\": \"orderBy\",\r\n \"in\": \"query\",\r\n \"description\": \"The field to order the list by. Can be one of `created`, `lastModified`, or `orderId` followed by an optional sort direction (`asc` or `desc`), default direction is `asc` (ascending) if not present.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"filter\",\r\n \"in\": \"query\",\r\n \"description\": \"A filter for the list, applied to the orderId\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Returns a list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderListDto found.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If `pageSize` or `pageIndex` is not within the allowed range, or if an invalid `orderBy` is specified\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets a paged list with sales orders of any type\",\r\n \"description\": \"Sample requests:\\r\\n \\r\\n`GET /salesorders`\\r\\n \\r\\n`GET /salesorders?customerId=10000&status=Open&pageSize=10`\\r\\n \\r\\n`GET /salesorders?orderBy=lastModified%20asc`\",\r\n \"operationId\": \"SalesOrders_GetList_\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"customerId\",\r\n \"in\": \"query\",\r\n \"description\": \"The customer for which to retrieve orders. If omitted or empty, orders for all customers are included\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"status\",\r\n \"in\": \"query\",\r\n \"description\": \"The order status to include in the result. If omitted or empty, orders with any status are included.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"modifiedSince\",\r\n \"in\": \"query\",\r\n \"description\": \"A date/time value for filtering when a sales order last changed.\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of customers retrieved per page\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 100\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"The zero based page index to retrieve\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 0\r\n }\r\n },\r\n {\r\n \"name\": \"orderBy\",\r\n \"in\": \"query\",\r\n \"description\": \"The field to order the list by. Can be one of `created`, `lastModified`, or `orderId` followed by an optional sort direction (`asc` or `desc`), default direction is `asc` (ascending) if not present.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"filter\",\r\n \"in\": \"query\",\r\n \"description\": \"A filter for the list, applied to the orderId\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Returns a list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderListDto found.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If `pageSize` or `pageIndex` is not within the allowed range, or if an invalid `orderBy` is specified\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"post\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Adds a new sales order to the system\",\r\n \"description\": \"Sample requests:\\r\\n \\r\\n```\\r\\nPOST /salesorders\\r\\n{\\r\\n \\\"customer\\\": {\\r\\n \\\"id\\\": \\\"10001\\\",\\r\\n },\\r\\n \\\"type\\\": \\\"SO\\\"\\r\\n}\\r\\n```\\r\\n```\\r\\nPOST /salesorders\\r\\n{\\r\\n \\\"customer\\\": {\\r\\n \\\"id\\\": \\\"10000\\\",\\r\\n \\\"order\\\": \\\"some-customer-order-nbr\\\"\\r\\n },\\r\\n \\\"type\\\": \\\"SO\\\",\\r\\n \\\"description\\\": \\\"sample request order\\\",\\r\\n \\\"status\\\": \\\"Hold\\\",\\r\\n \\\"orderLines\\\": [\\r\\n {\\r\\n \\\"inventoryId\\\": \\\"StockItem1\\\",\\r\\n \\\"quantity\\\": 4,\\r\\n \\\"unitPrice\\\": 101.25\\r\\n }\\r\\n ]\\r\\n}\\r\\n```\",\r\n \"operationId\": \"SalesOrders_CreateNewItem_\",\r\n \"requestBody\": {\r\n \"description\": \"Information about the sales order to create\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderCommand\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderCommand\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderCommand\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"201\": {\r\n \"description\": \"The order was created successfully, and the Location request header contains the address to call to GET the new sales order\",\r\n \"headers\": {\r\n \"Location\": {\r\n \"description\": \"Location of the newly created resource\",\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location of the newly created resource\",\r\n \"format\": \"\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in command is not present or active, or is outside the allowed range\\r\\n See #/components/x-visma-erp-error-codes for the full list of error codes.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"409\": {\r\n \"description\": \"Conflict\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/rotrut\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets ROT/RUT information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000123/rotrut`\",\r\n \"operationId\": \"SalesOrders_GetItemRotRut_typeorderIdrotrut\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderRotRutDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderRotRutDto\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderRotRutDto\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderRotRutDto\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/commissions\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets commission information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/commissions`\",\r\n \"operationId\": \"SalesOrders_GetItemCommissions_typeorderIdcommissions\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderCommissionDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderCommissionDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderCommissionDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderCommissionDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/lines\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets sales order lines for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/lines`\",\r\n \"operationId\": \"SalesOrders_GetItemLines_typeorderIdlines\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of lines retrieved per page, defaults to 1000 if not specified\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 1000\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"The zero based page index to retrieve, defaults to 0 if not specified\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 0\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.PagedResult`1 object if sales order is found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"patch\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Make modifications to an existing sales order lines\",\r\n \"description\": \"If-Match header represents a version of Sales Order to be modified and must be included in request.\\r\\nValue of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header.\",\r\n \"operationId\": \"SalesOrders_PatchLines_typeorderIdlines\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of the order to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The order number to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"requestBody\": {\r\n \"description\": \"Data to change about the sales order lines\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderLinesCommand\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderLinesCommand\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderLinesCommand\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The order was modified successfully\"\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in command is outside the allowed range\\r\\n See #/components/x-visma-erp-error-codes for the full list of error codes.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"The order specified was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"412\": {\r\n \"description\": \"Order version does not match with If-Match header\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"428\": {\r\n \"description\": \"If-Match header was not supplied\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"delete\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Delete lines from an existing sales order\",\r\n \"description\": \"Sample requests:\\r\\n \\r\\n```\\r\\nDELETE /salesorders/SO/012345/lines?ids=1,2,3,55,78\\r\\n```\",\r\n \"operationId\": \"SalesOrders_DeleteLines_typeorderIdlines\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of the order to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The order number to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"ids\",\r\n \"in\": \"query\",\r\n \"description\": \"Lines to delete with comma seprator. Limit of line ids is 1000.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The lines were deleted successfully\"\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in ids is outside the allowed range\\r\\n See #/components/x-visma-erp-error-codes for the full list of error codes.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Specified order was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"post\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Adds new lines to a existing sales order in the system\",\r\n \"description\": \"Sample request:\\r\\n```\\r\\nPOST /salesorders/SO/123456/lines\\r\\n{\\r\\n \\\"lines\\\": [\\r\\n {\\r\\n \\\"inventoryId\\\": \\\"StockItem1\\\",\\r\\n \\\"quantity\\\": 4,\\r\\n \\\"unitPrice\\\": 101.25\\r\\n },\\r\\n {\\r\\n \\\"inventoryId\\\": \\\"StockItem2\\\",\\r\\n \\\"quantity\\\": 100,\\r\\n \\\"unitPrice\\\": 121.36\\r\\n }\\r\\n ]\\r\\n}\\r\\n```\",\r\n \"operationId\": \"SalesOrders_AddLines_typeorderIdlines\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"requestBody\": {\r\n \"description\": \"Information about the lines to create\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AddSalesOrderLinesCommand\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AddSalesOrderLinesCommand\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AddSalesOrderLinesCommand\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The order lines where created successfully, and the Location request header contains the address to call to GET the new sales order\"\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in command is not present or active, or is outside the allowed range\\r\\n Specified order was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Not Found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/lines/{lineId}\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets a specific sales order line for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/lines/1`\",\r\n \"operationId\": \"SalesOrders_GetItemLine_typeorderIdlineslineId\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"lineId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the line to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderLineDto object if sales order line is found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDto\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDto\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDto\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible\\r\\n or the line with the id lineId is not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/tax\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets tax information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/tax`\",\r\n \"operationId\": \"SalesOrders_GetItemTax_typeorderIdtax\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderTaxDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderTaxDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderTaxDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderTaxDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/discounts\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets discount details information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/discounts`\",\r\n \"operationId\": \"SalesOrders_GetItemDiscounts_typeorderIddiscounts\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDiscountDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDiscountDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDiscountDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDiscountDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"components\": {\r\n \"schemas\": {\r\n \"AddSalesOrderLinesCommand\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lines\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderLineDto\"\r\n },\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"AddressDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The address id\",\r\n \"format\": \"int32\"\r\n },\r\n \"overridesDefault\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this address overrides the default address\"\r\n },\r\n \"line1\": {\r\n \"type\": \"string\",\r\n \"description\": \"Address line 1\",\r\n \"nullable\": true\r\n },\r\n \"line2\": {\r\n \"type\": \"string\",\r\n \"description\": \"Address line 2\",\r\n \"nullable\": true\r\n },\r\n \"line3\": {\r\n \"type\": \"string\",\r\n \"description\": \"Address line 3\",\r\n \"nullable\": true\r\n },\r\n \"postalCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"The postal code\",\r\n \"nullable\": true\r\n },\r\n \"city\": {\r\n \"type\": \"string\",\r\n \"description\": \"The city\",\r\n \"nullable\": true\r\n },\r\n \"country\": {\r\n \"$ref\": \"#/components/schemas/CdNamePairDto\"\r\n },\r\n \"county\": {\r\n \"$ref\": \"#/components/schemas/CdNamePairDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CdDescriptionPairDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CdNamePairDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"The name\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"ContactDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The id of the contact\",\r\n \"format\": \"int32\"\r\n },\r\n \"overridesDefault\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this overrides the default contact\"\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"The name of the contact\",\r\n \"nullable\": true\r\n },\r\n \"attention\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any attention for the contact\",\r\n \"nullable\": true\r\n },\r\n \"email\": {\r\n \"type\": \"string\",\r\n \"description\": \"The e-mail address of the contact\",\r\n \"nullable\": true\r\n },\r\n \"phone1\": {\r\n \"type\": \"string\",\r\n \"description\": \"The phone number of the contact\",\r\n \"nullable\": true\r\n },\r\n \"phone2\": {\r\n \"type\": \"string\",\r\n \"description\": \"The secondary phone number of the contact\",\r\n \"nullable\": true\r\n },\r\n \"fax\": {\r\n \"type\": \"string\",\r\n \"description\": \"The fax number of the contact\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CustomerDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal unique id\",\r\n \"format\": \"int32\"\r\n },\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"Unique id for the customer\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"The name of the customer\",\r\n \"nullable\": true\r\n },\r\n \"currencyId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The currency Id used by the customer\",\r\n \"nullable\": true\r\n },\r\n \"customerClassId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The class of the customer\",\r\n \"nullable\": true\r\n },\r\n \"defaultLocation\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationDto\"\r\n },\r\n \"addressLine1\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's first address line\",\r\n \"nullable\": true\r\n },\r\n \"addressLine2\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's second address line\",\r\n \"nullable\": true\r\n },\r\n \"postalCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's postal code\",\r\n \"nullable\": true\r\n },\r\n \"country\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's country code\",\r\n \"nullable\": true\r\n },\r\n \"salutation\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's salutation\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's status code\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.CustomerDto class Defines a customer\"\r\n },\r\n \"CustomerDtoPagedResult\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"value\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/CustomerDto\"\r\n },\r\n \"description\": \"Gets or sets the items that are paged\",\r\n \"nullable\": true\r\n },\r\n \"nextPage\": {\r\n \"type\": \"string\",\r\n \"description\": \"Gets or sets the link to the next page with more results. If set to null then no more records are present.\",\r\n \"nullable\": true\r\n },\r\n \"totalCount\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CustomerLocationDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location id\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location description\",\r\n \"nullable\": true\r\n },\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal id of the customer location\",\r\n \"format\": \"int32\"\r\n },\r\n \"countryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The country code of the location\",\r\n \"nullable\": true\r\n },\r\n \"gln\": {\r\n \"type\": \"string\",\r\n \"description\": \"The global localization number of the location\",\r\n \"nullable\": true\r\n },\r\n \"taxRegistrationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The tax registration id of the location\",\r\n \"nullable\": true\r\n },\r\n \"corporateId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The corporate id of the location\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The site id of the location\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CustomerLocationItemDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location id\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location description\",\r\n \"nullable\": true\r\n },\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal id of the customer location\",\r\n \"format\": \"int32\"\r\n },\r\n \"countryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The country code of the location\",\r\n \"nullable\": true\r\n },\r\n \"gln\": {\r\n \"type\": \"string\",\r\n \"description\": \"The global localization number of the location\",\r\n \"nullable\": true\r\n },\r\n \"taxRegistrationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The tax registration id of the location\",\r\n \"nullable\": true\r\n },\r\n \"corporateId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The corporate id of the location\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The site id of the location\",\r\n \"nullable\": true\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/AddressDto\"\r\n },\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/ContactDto\"\r\n },\r\n \"priceClassId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Price class\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"DtoLink\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"href\": {\r\n \"type\": \"string\",\r\n \"description\": \"A link to the item in question\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"EmployeeDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The internal unique identifier of the employee\",\r\n \"nullable\": true\r\n },\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the employee\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"IdDescriptionPairDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The id\",\r\n \"format\": \"int32\"\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"InventoryAvailabilityExpansions\": {\r\n \"enum\": [\r\n \"None\",\r\n \"Location\",\r\n \"Attribute\",\r\n \"All\"\r\n ],\r\n \"type\": \"string\",\r\n \"description\": \"Defines expansion options for the inventory summary endpoint.\"\r\n },\r\n \"InventoryItemAvailabilityDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"inventoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The inventory id (InventoryCd)\",\r\n \"nullable\": true\r\n },\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The internal Id used by the system to identify the inventory item\",\r\n \"format\": \"int32\"\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description of the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"baseUnit\": {\r\n \"type\": \"string\",\r\n \"description\": \"The base unit for the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"availability\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/WarehouseAvailabilityDto\"\r\n },\r\n \"description\": \"Warehouse information for the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"attributes\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"string\"\r\n },\r\n \"description\": \"Attributes applied to the inventory item\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Inventory summary for a specific inventory item\"\r\n },\r\n \"InventoryItemAvailabilityDtoPagedResult\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"value\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/InventoryItemAvailabilityDto\"\r\n },\r\n \"description\": \"Gets or sets the items that are paged\",\r\n \"nullable\": true\r\n },\r\n \"nextPage\": {\r\n \"type\": \"string\",\r\n \"description\": \"Gets or sets the link to the next page with more results. If set to null then no more records are present.\",\r\n \"nullable\": true\r\n },\r\n \"totalCount\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"LocationAvailabilityDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalLocationId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The internal id used by the sytem for this location\",\r\n \"format\": \"int32\"\r\n },\r\n \"locationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The location id (LocationCd) for this location\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description of the location\",\r\n \"nullable\": true\r\n },\r\n \"quantityOnHand\": {\r\n \"type\": \"number\",\r\n \"description\": \"Physical quantity on-hand of items in the specific location\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityAvailable\": {\r\n \"type\": \"number\",\r\n \"description\": \"You can configure the way this estimated quantity is calculated by using availability\\r\\ncalculation rules. The available quantity may include anticipated transactions and therefore\\r\\nmay be less than or greater than the QuantityOnHand. Anticipated transactions correspond\\r\\nto the documents and transactions that have been entered in the system but not yet\\r\\nprocessed to the end.\\r\\nIn the availability calculation settings of an item class, you specify which anticipated\\r\\ntransactions affect the available quantity. Thus, the available quantity may include\\r\\ngoods on purchase orders and exclude the goods allocated for sales orders. You can use\\r\\nthe available quantity as an indicator of demand.\\r\\nNote: For quantities on warehouse location level, only quantities added specifically for the location are taken into consideration in quantityAvailable\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityNotAvailable\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity stored at locations not included in the availability calculation.\\r\\nFor each warehouse location, the 'Include in Qty. Available' check box on the\\r\\nWarehouses(IN204000) screen defines whether the quantity of items stored at this\\r\\nlocation is included in the quantity of available items.\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityAvailableForShipment\": {\r\n \"type\": \"number\",\r\n \"description\": \"Estimated quantity calculated by using the following formula: the QuantityOnHand minus the quantity on unreleased inventory\\r\\nissues, minus the quantity allocated for shipping. Thus, the QuantityAvailableForShipment can be less than the QuantityOnHand.\\r\\nNote: For quantities on warehouse location level, only quantities added specifically for the location are taken into consideration in quantityAvailableForShipment\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityPurchaseOrders\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of the inventory item included in open purchase orders.\\r\\nNote: For quantities on warehouse location level, only quantities added specifically for the location are taken into consideration\",\r\n \"format\": \"double\"\r\n },\r\n \"lastModified\": {\r\n \"type\": \"string\",\r\n \"description\": \"Date and time this entry for this location was modified\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"LocationDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines a warehouse location\"\r\n },\r\n \"NewSalesOrderAddressDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"line1\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 1\",\r\n \"nullable\": true\r\n },\r\n \"line2\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 2\",\r\n \"nullable\": true\r\n },\r\n \"line3\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 3\",\r\n \"nullable\": true\r\n },\r\n \"postalCode\": {\r\n \"maxLength\": 20,\r\n \"type\": \"string\",\r\n \"description\": \"The postal code\",\r\n \"nullable\": true\r\n },\r\n \"city\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"The city\",\r\n \"nullable\": true\r\n },\r\n \"countryId\": {\r\n \"maxLength\": 2,\r\n \"type\": \"string\",\r\n \"description\": \"The country. Required when setting the address.\",\r\n \"nullable\": true\r\n },\r\n \"stateId\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"The state\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines a new address when creating a sales order.\\r\\nWhen the address information is provided, it is expected to provide all needed fields for the address(line1, line2, countryId etc).\\r\\nNo default values from the customer will be set for the non defined address fields.\"\r\n },\r\n \"NewSalesOrderBillingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderContactDto\"\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderAddressDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderCommand\": {\r\n \"required\": [\r\n \"customer\",\r\n \"type\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the type id of an active sales order type to create\"\r\n },\r\n \"orderId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the new id that should be assigned to the new sales order.\\r\\nThis is required if the specified Visma.net.ERP.SalesOrders.Api.Application.Commands.NewSalesOrder.NewSalesOrderCommand.Type has manual numbering set up. If not it should be null or empty.\",\r\n \"nullable\": true\r\n },\r\n \"currencyId\": {\r\n \"maxLength\": 5,\r\n \"type\": \"string\",\r\n \"description\": \"Override the CurrencyId for the order. Must be a valid currency Id. If not specified, the customer's currency is used if not null. If null, company base currency is used\",\r\n \"nullable\": true\r\n },\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the order date of the order to create. If not supplied, the current date will be used\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"requestOn\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the requested on date for the order to create. If not supplied, the current date will be used\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"cancelBy\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the cancel by date for the order to create. If not supplied, the order type's days to keep will be added to the current date to determine the value of this field\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the description for the order to create\\r\\n
Note that text fields should not contain any personally identifiable or otherwise sensitive data\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the initial status code for the order. Must be null, empty or one of \\\"Open\\\" or \\\"Hold\\\". If not supplied the value will be determined by the sales order type.\",\r\n \"nullable\": true\r\n },\r\n \"customer\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderCustomerDto\"\r\n },\r\n \"print\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderPrintDto\"\r\n },\r\n \"shipping\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderShippingDto\"\r\n },\r\n \"billing\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderBillingDto\"\r\n },\r\n \"financialInformation\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderFinancialInfoDto\"\r\n },\r\n \"ownerId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the owner (employee) for the order\",\r\n \"nullable\": true\r\n },\r\n \"orderLines\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderLineDto\"\r\n },\r\n \"description\": \"The lines that are added to the order upon creation\",\r\n \"nullable\": true\r\n },\r\n \"taxZoneId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Override the TaxZoneId for the order. If not specified, the customer's location's TaxZoneId will be used\",\r\n \"nullable\": true\r\n },\r\n \"note\": {\r\n \"maxLength\": 2048,\r\n \"type\": \"string\",\r\n \"description\": \"Any note to apply to the order header.\",\r\n \"nullable\": true\r\n },\r\n \"paymentSettings\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderPaymentSettings\"\r\n },\r\n \"useReplacementCostForMarginAndProfit\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"When this option is set to `true`, the `costTotal` of the order will be calculated based on `replacementUnitCost`.\\r\\nIf option is set to `false`, the `costTotal` will be calculated based on `unitCost`\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderContactDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"name\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the full name of the contact\",\r\n \"nullable\": true\r\n },\r\n \"attention\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets any attention for the contact\",\r\n \"nullable\": true\r\n },\r\n \"phone1\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the primary phone number of the contact\",\r\n \"nullable\": true\r\n },\r\n \"email\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the e-mail address of the contact\",\r\n \"format\": \"email\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines a new contact when creating a new sales order.\\r\\nWhen the contact information is provided, it is expected to provide all needed fields for the contact(name, attention etc).\\r\\nNo default values from the customer will be set for the non defined contact fields.\"\r\n },\r\n \"NewSalesOrderCustomerDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique id of the the customer\",\r\n \"nullable\": true\r\n },\r\n \"contactId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The contact id for the customer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"order\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"The customer order text\",\r\n \"nullable\": true\r\n },\r\n \"refNo\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"The customer ref number text\",\r\n \"nullable\": true\r\n },\r\n \"locationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the location for the customer supplied to use on the order.\\r\\nMust be a valid active location for the customer supplied in Visma.net.ERP.SalesOrders.Api.Dto.NewSalesOrder.NewSalesOrderCustomerDto.Id\",\r\n \"nullable\": true\r\n },\r\n \"termsId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the terms to use for the sales order.\\r\\nMust be a valid terms identifier\",\r\n \"nullable\": true\r\n },\r\n \"gln\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique global location number of the customer\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderFinancialInfoDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"invoiceSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets if the order should be invoiced/billed separately\",\r\n \"nullable\": true\r\n },\r\n \"invoiceDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the invoice date of the invoice that will be generated for the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"invoiceId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The reference number of the invoice generated for this order.\\r\\nThis can be used if the numbering sequence assigned to invoices is configured for manual numbering.\",\r\n \"nullable\": true\r\n },\r\n \"postPeriod\": {\r\n \"maxLength\": 6,\r\n \"type\": \"string\",\r\n \"description\": \"The post period for the invoice. This can be used to override the financial period. Must be a valid existing financial period.\",\r\n \"nullable\": true\r\n },\r\n \"dueDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The due date for the invoice created for the order. Default due date is set according to the credit terms.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"cashDiscountDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date when the cash discount is available for the invoice created for the order. Default date is set based on the terms selected in the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderLineDto\": {\r\n \"required\": [\r\n \"inventoryId\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"inventoryId\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\",\r\n \"description\": \"The Inventory Id of the item to add\"\r\n },\r\n \"description\": {\r\n \"maxLength\": 256,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the description of the order line item. This will override the default description from the inventory item\\r\\n
Note that text fields should not contain any personally identifiable or otherwise sensitive data\",\r\n \"nullable\": true\r\n },\r\n \"unitOfMeasure\": {\r\n \"maxLength\": 6,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the Unit of measure for the line item. This will override the default UOM for the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"shippingRule\": {\r\n \"type\": \"string\",\r\n \"description\": \"The way the line item should be shipped. This will override the default or the one set on the order head.\\r\\n
One of the following options can be set:
CancelRemainder: The ordered quantity should be delivered in one shipmentBackOrderAllowed: The ordered quantity can be delivered in multiple shipments.ShipComplete: The ordered quantity should be delivered in one shipment.\",\r\n \"nullable\": true\r\n },\r\n \"quantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the quantity of items on the order line\",\r\n \"format\": \"double\"\r\n },\r\n \"unitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the unit cost of the product on the line. If no cost is set (null or omitted) the cost will be set\\r\\naccording to predefined rules\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"unitPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the unit price for the product on the line.\\r\\nIf no price is set(null or omitted) the price will be set according to predefined rules based on the inventoryId and the customer.\\r\\nNote that the behavior of the `unitPrice` field is affected by the `hasManualPrice` option.\\r\\nIf `hasManualPrice` is provided and set to \\\"false\\\", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"externalLink\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the external link for the line\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the warehouse the item should be shipped from. This will override the default, or the one set on the order head.\",\r\n \"nullable\": true\r\n },\r\n \"reasonCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the reason code for the line. This must be one of the selectable reason codes\",\r\n \"nullable\": true\r\n },\r\n \"taxCategoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the default tax category id (from customer's class). The value must be one of the selectable Tax Categories\",\r\n \"nullable\": true\r\n },\r\n \"undershipThreshold\": {\r\n \"maximum\": 100,\r\n \"minimum\": 0,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the undership threshold in percent. If not set, information from the inventory item is used\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"overshipThreshold\": {\r\n \"maximum\": 999,\r\n \"minimum\": 100,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the overship threshold in percent. If not set, information from the inventory item is used\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"shipDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the day the order line should be shipped, so that the customer gets it on the requested date (Ship On).\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"requestDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the date the order line is requested (Requested On)\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"salesAccountId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the Sales Account Id of the line. The value must be one of the selectable Accounts.\\r\\nIf not set, a value based on the rules is used\",\r\n \"nullable\": true\r\n },\r\n \"subaccount\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"string\"\r\n },\r\n \"description\": \"Overrides the Subaccount setup for the line.\\r\\nEach entry corresponds to a subaccount id/value pair\",\r\n \"nullable\": true\r\n },\r\n \"note\": {\r\n \"maxLength\": 2048,\r\n \"type\": \"string\",\r\n \"description\": \"Adds a text note to the sales order line.\",\r\n \"nullable\": true\r\n },\r\n \"discountCode\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the discount for the line if applicable. This must be one of the selectable discount codes.\\r\\n\\r\\nNote that the behavior of the 'discountCode' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountCode' is provided, the system will set the discountCode according to the predefined rules.\\r\\n\",\r\n \"nullable\": true\r\n },\r\n \"discountPercent\": {\r\n \"maximum\": 100,\r\n \"minimum\": -100,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the manual percentage discount for the line.\\r\\n\\r\\nNote that the behavior of the 'discountPercent' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountPercent' is provided, the system will set the discountPercent according to the predefined rules.\\r\\n\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the manual currency discount amount for the line.\\r\\n\\r\\nNote that the behavior of the 'discountAmount' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountAmount' is provided, the system will set the discountAmount according to the predefined rules.\\r\\n\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"hasManualDiscount\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that line level discount is applied manually.\\r\\n\\r\\nNote that the behavior of the fields 'discountCode', 'discountPercent' and 'discountAmount' is affected by this option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and discount field(s) is provided, the system will set the line level discounts according to the predefined rules.\\r\\n\",\r\n \"nullable\": true\r\n },\r\n \"warehouseLocationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the warehouse location that will be used for the shipment generated for the order the warehouse location Id for this line. This must be a valid location for `warehouseId` and will override the default if set.\",\r\n \"nullable\": true\r\n },\r\n \"operation\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of operation the line represents to the order. Acceptable values are 'Issue' or 'Receipt'. This must be a valid operation for sales order type.\",\r\n \"nullable\": true\r\n },\r\n \"hasManualPrice\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that the `unitPrice` in this line has been specified manually.\\r\\nIf set to \\\"false\\\", the system updates the unit price in the line according to predefined rules.\\r\\nNote that the behavior of the field `unitPrice` is affected by this option.\\r\\nIf `hasManualPrice` is provided and set to \\\"false\\\", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderPaymentSettings\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"paymentMethodId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the default payment method set on the customer. This must be a valid and active payment method id.\",\r\n \"nullable\": true\r\n },\r\n \"cashAccountId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"The cash account associated with the set payment method.\",\r\n \"nullable\": true\r\n },\r\n \"paymentReference\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the external reference number for the order. This must be set if order type requires it.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderShippingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"scheduledDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the date the shipment is scheduled for\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"shipSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether the order should be shipped separately or included in a batch segment\",\r\n \"nullable\": true\r\n },\r\n \"rule\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the shipping rule for the order\",\r\n \"nullable\": true\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderAddressDto\"\r\n },\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderContactDto\"\r\n },\r\n \"preferredWarehouseId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the default site for the customer supplied to use on the order. Must be a valid site id\",\r\n \"nullable\": true\r\n },\r\n \"intrastatTransactionTypeId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Sets the intrastat transaction type id for the sales order, if not supplied the default value from the ordertype will be used. Must be a valid intrastat transaction type id.\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"shipViaId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the unique id that represents the carrier and its service to be used for shipping the ordered goods.\",\r\n \"nullable\": true\r\n },\r\n \"residentialDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether this is residential delivery\",\r\n \"nullable\": true\r\n },\r\n \"saturdayDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether this is a saturday delivery\",\r\n \"nullable\": true\r\n },\r\n \"insurance\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether insurance applies to this shipping\",\r\n \"nullable\": true\r\n },\r\n \"priority\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Sets priority of the order\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderAddressDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"line1\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 1\",\r\n \"nullable\": true\r\n },\r\n \"line2\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 2\",\r\n \"nullable\": true\r\n },\r\n \"line3\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 3\",\r\n \"nullable\": true\r\n },\r\n \"postalCode\": {\r\n \"maxLength\": 20,\r\n \"type\": \"string\",\r\n \"description\": \"The postal code\",\r\n \"nullable\": true\r\n },\r\n \"city\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"The city\",\r\n \"nullable\": true\r\n },\r\n \"stateId\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"The state\",\r\n \"nullable\": true\r\n },\r\n \"countryId\": {\r\n \"maxLength\": 2,\r\n \"type\": \"string\",\r\n \"description\": \"The country.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines an address when updating a sales order.\\r\\nOnly the provided fields will be changed in address.\"\r\n },\r\n \"PatchSalesOrderBillingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderAddressDto\"\r\n },\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderContactDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderCommand\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the order date of the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"customer\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderCustomerDto\"\r\n },\r\n \"currencyId\": {\r\n \"maxLength\": 5,\r\n \"type\": \"string\",\r\n \"description\": \"Override the CurrencyId for the order. Must be a valid currency Id.\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Description for the order\\r\\n
Note that text fields should not contain any personally identifiable or otherwise sensitive data\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the status code for the order. Must be \\\"Open\\\" or \\\"Hold\\\".\",\r\n \"nullable\": true\r\n },\r\n \"print\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderPrintDto\"\r\n },\r\n \"cancelBy\": {\r\n \"type\": \"string\",\r\n \"description\": \"Cancel by date for the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"shipping\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderShippingDto\"\r\n },\r\n \"billing\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderBillingDto\"\r\n },\r\n \"ownerId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the owner (employee) for the order\",\r\n \"nullable\": true\r\n },\r\n \"requestOn\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the requested on date for the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"financialInformation\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderFinancialInfoDto\"\r\n },\r\n \"paymentSettings\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderPaymentSettingsDto\"\r\n },\r\n \"note\": {\r\n \"maxLength\": 2048,\r\n \"type\": \"string\",\r\n \"description\": \"Any note to apply to the order header.\",\r\n \"nullable\": true\r\n },\r\n \"taxZoneId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Override the TaxZoneId for the order\",\r\n \"nullable\": true\r\n },\r\n \"useReplacementCostForMarginAndProfit\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"When this option is set to `true`, the `costTotal` of the order will be calculated based on `replacementUnitCost`.\\r\\nIf option is set to `false`, the `costTotal` will be calculated based on `unitCost`\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Application.Commands.PatchSalesOrder.PatchSalesOrderCommand is a command for updating parts of a sales order\"\r\n },\r\n \"PatchSalesOrderContactDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"name\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the full name of the contact\",\r\n \"nullable\": true\r\n },\r\n \"attention\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets any attention for the contact\",\r\n \"nullable\": true\r\n },\r\n \"phone1\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the primary phone number of the contact\",\r\n \"nullable\": true\r\n },\r\n \"email\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the e-mail address of the contact\",\r\n \"format\": \"email\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines an contact when updating a sales order.\\r\\nOnly the provided fields will be changed in contact.\"\r\n },\r\n \"PatchSalesOrderCustomerDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique id of the the customer\",\r\n \"nullable\": true\r\n },\r\n \"refNo\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"The customer ref number text. If null or not supplied the value will not be changed\",\r\n \"nullable\": true\r\n },\r\n \"order\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"The customer order text.\",\r\n \"nullable\": true\r\n },\r\n \"contactId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The contact id for the customer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"termsId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the terms to use for the sales order.\\r\\nMust be a valid terms identifier\",\r\n \"nullable\": true\r\n },\r\n \"locationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the location for the customer supplied to use on the order.\\r\\nMust be a valid active location for the customer/>\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderFinancialInfoDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"invoiceSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets if the order should be invoiced/billed separately\",\r\n \"nullable\": true\r\n },\r\n \"invoiceDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the invoice date of the invoice that will be generated for the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"invoiceId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The reference number of the invoice generated for this order.\\r\\nThis can be used if the numbering sequence assigned to invoices is configured for manual numbering.\",\r\n \"nullable\": true\r\n },\r\n \"postPeriod\": {\r\n \"maxLength\": 6,\r\n \"type\": \"string\",\r\n \"description\": \"The post period for the invoice. This can be used to override the financial period. Must be a valid existing financial period.\",\r\n \"nullable\": true\r\n },\r\n \"dueDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The due date for the invoice created for the order. Default due date is set according to the credit terms.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"cashDiscountDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date when the cash discount is available for the invoice created for the order. Default date is set based on the terms selected in the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderLineDto\": {\r\n \"required\": [\r\n \"lineId\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lineId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The line id of the line.\",\r\n \"format\": \"int32\"\r\n },\r\n \"reasonCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"Patch the reason code for the line. This must be one of the selectable reason codes\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"maxLength\": 256,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the description of the order line item. This will override the default description from the inventory item\\r\\n
Note that text fields should not contain any personally identifiable or otherwise sensitive data\",\r\n \"nullable\": true\r\n },\r\n \"shippingRule\": {\r\n \"type\": \"string\",\r\n \"description\": \"The way the line item should be shipped.\\r\\n
One of the following options can be set:
CancelRemainder: The ordered quantity should be delivered in one shipmentBackOrderAllowed: The ordered quantity can be delivered in multiple shipments.ShipComplete: The ordered quantity should be delivered in one shipment.\",\r\n \"nullable\": true\r\n },\r\n \"unitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the unit cost of the product on the line.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"undershipThreshold\": {\r\n \"maximum\": 100,\r\n \"minimum\": 0,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the undership threshold in percent. If not set, information from the inventory item is used\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"overshipThreshold\": {\r\n \"maximum\": 999,\r\n \"minimum\": 100,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the overship threshold in percent. If not set, information from the inventory item is used\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"externalLink\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the external link for the line\",\r\n \"nullable\": true\r\n },\r\n \"note\": {\r\n \"maxLength\": 2048,\r\n \"type\": \"string\",\r\n \"description\": \"Any note to apply to the order header.\",\r\n \"nullable\": true\r\n },\r\n \"salesAccountId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the Sales Account Id of the line. The value must be one of the selectable Accounts.\\r\\nIf not set, a value based on the rules is used\",\r\n \"nullable\": true\r\n },\r\n \"sortOrder\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"shipDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the day the order line should be shipped, so that the customer gets it on the requested date (Ship On).\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"requestDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the date the order line is requested (Requested On)\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"warehouseLocationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the warehouse location that will be used for the shipment generated for the order the warehouse location Id for this line.\\r\\nThis must be a valid location for `warehouseId` and will override the default if set.\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the warehouse the item should be shipped from. This will override the default, or the one set on the order head.\",\r\n \"nullable\": true\r\n },\r\n \"subaccount\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"string\"\r\n },\r\n \"description\": \"Overrides the Subaccount setup for the line.\\r\\nEach entry corresponds to a subaccount id/value pair\",\r\n \"nullable\": true\r\n },\r\n \"hasManualDiscount\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that line level discount is applied manually.\\r\\n\\r\\nNote that the behavior of the fields 'discountCode', 'discountPercent' and 'discountAmount' is affected by this option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and discount field(s) is provided, the system will set the line level discounts according to the predefined rules.\\r\\n\",\r\n \"nullable\": true\r\n },\r\n \"discountPercent\": {\r\n \"maximum\": 100,\r\n \"minimum\": -100,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the manual percentage discount for the line.\\r\\n\\r\\nNote that the behavior of the 'discountPercent' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountPercent' is provided, the system will set the discountPercent according to the predefined rules.\\r\\n\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the manual currency discount amount for the line.\\r\\n\\r\\nNote that the behavior of the 'discountAmount' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountAmount' is provided, the system will set the discountAmount according to the predefined rules.\\r\\n\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"taxCategoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the default tax category id. The value must be one of the selectable Tax Categories\",\r\n \"nullable\": true\r\n },\r\n \"discountCode\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the discount for the line if applicable. This must be one of the selectable discount codes.\\r\\n\\r\\nNote that the behavior of the 'discountCode' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountCode' is provided, the system will set the discountCode according to the predefined rules.\\r\\n\",\r\n \"nullable\": true\r\n },\r\n \"quantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the quantity of items on the order line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"unitOfMeasure\": {\r\n \"maxLength\": 6,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the Unit of measure for the line item. This will override the default UOM for the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"unitPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the unit price for the product on the line.\\r\\nIf no price is set(null or omitted) the price will be set according to predefined rules based on the inventoryId and the customer.\\r\\nNote that the behavior of the `unitPrice` field is affected by the `hasManualPrice` option.\\r\\nIf `hasManualPrice` is provided and set to \\\"false\\\", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"operation\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of operation the line represents to the order. Acceptable values are 'Issue' or 'Receipt'. This must be a valid operation for sales order type.\",\r\n \"nullable\": true\r\n },\r\n \"hasManualPrice\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that the `unitPrice` in this line has been specified manually.\\r\\nIf set to \\\"false\\\", the system updates the unit price in the line according to predefined rules.\\r\\nNote that the behavior of the field `unitPrice` is affected by this option.\\r\\nIf `hasManualPrice` is provided and set to \\\"false\\\", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The sales order line which is set to patch\"\r\n },\r\n \"PatchSalesOrderLinesCommand\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lines\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderLineDto\"\r\n },\r\n \"description\": \"The sales order lines that are set to patch\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Application.Commands.PatchSalesOrderLines.PatchSalesOrderLinesCommand is a command for updating the lines of a sales order\"\r\n },\r\n \"PatchSalesOrderPaymentSettingsDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"paymentMethodId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the default payment method set on the customer. This must be a valid and active payment method id.\",\r\n \"nullable\": true\r\n },\r\n \"cashAccountId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"The cash account associated with the set payment method.\",\r\n \"nullable\": true\r\n },\r\n \"paymentReference\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the external reference number for the order. This must be set if order type requires it.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderShippingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"shipSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether the order should be shipped separately or included in a batch segment\",\r\n \"nullable\": true\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderAddressDto\"\r\n },\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderContactDto\"\r\n },\r\n \"preferredWarehouseId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the default site for the customer supplied to use on the order. Must be a valid site id\\r\\nIf empty string, the default site for order will be removed\",\r\n \"nullable\": true\r\n },\r\n \"rule\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the shipping rule for the order\",\r\n \"nullable\": true\r\n },\r\n \"scheduledDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the date the shipment is scheduled for\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"intrastatTransactionTypeId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Sets the intrastat transaction type id for the sales order. Must be a valid intrastat transaction type id.\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"shipViaId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the unique id that represents the carrier and its service to be used for shipping the ordered goods. Must be a valid carrier id.\\r\\nIf empty string then the value will be set to null\",\r\n \"nullable\": true\r\n },\r\n \"residentialDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether this is residential delivery\",\r\n \"nullable\": true\r\n },\r\n \"saturdayDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether this is a saturday delivery\",\r\n \"nullable\": true\r\n },\r\n \"insurance\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether insurance applies to this shipping\",\r\n \"nullable\": true\r\n },\r\n \"priority\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Sets priority of the order\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"ProblemDetails\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"title\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"detail\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"instance\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": {}\r\n },\r\n \"ProjectDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n },\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal unique identifier of the project\",\r\n \"format\": \"int32\"\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.ProjectDto class defines a project reference for a sales order\"\r\n },\r\n \"SalesOrderBillingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/ContactDto\"\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/AddressDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderCommissionDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"salesPersonId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The id of the sales person that gets the commision\",\r\n \"format\": \"int32\"\r\n },\r\n \"percent\": {\r\n \"type\": \"number\",\r\n \"description\": \"The commission percent\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"amount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The commission amount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"commissionableAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The order's commisionable amount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderCustomerDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal unique id of the customer\",\r\n \"format\": \"int32\"\r\n },\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique id of the the customer\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer name\",\r\n \"nullable\": true\r\n },\r\n \"taxZone\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"contactId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The contact id for the customer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"order\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer order text\",\r\n \"nullable\": true\r\n },\r\n \"refNo\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer ref number text\",\r\n \"nullable\": true\r\n },\r\n \"location\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderDiscountDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"manualOrderIndex\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The number of discount line set for the order\",\r\n \"format\": \"int32\"\r\n },\r\n \"skipDiscount\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the discount has been cancelled for the order and is not applicable\"\r\n },\r\n \"discountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the discount applied to the order\",\r\n \"nullable\": true\r\n },\r\n \"discountSequenceId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the discount sequence of the discount ID applied to the order\",\r\n \"nullable\": true\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of discount whose sequence was applied to the document(Group or Document)\",\r\n \"nullable\": true\r\n },\r\n \"isManual\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that the discount has been applied manually\"\r\n },\r\n \"discountableAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amount used as a base for discount calculation if the discount is based on amount.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountableQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity used as a base for discount calculation if the discount is based on quantity.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amount of the discount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountPercent\": {\r\n \"type\": \"number\",\r\n \"description\": \"The discount percent, if the discount is defined to be calculated as a percentage\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"freeItem\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"freeItemQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of the free item. Used to set the quantity for the order line generate by a free item discount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type code for the sales order\",\r\n \"nullable\": true\r\n },\r\n \"orderId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique identifier of the order\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"Description of the order\",\r\n \"nullable\": true\r\n },\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"Date the order was submitted\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"cancelBy\": {\r\n \"type\": \"string\",\r\n \"description\": \"The cancel date for the order\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"lastModified\": {\r\n \"type\": \"string\",\r\n \"description\": \"Date the order was last modified\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"requestOn\": {\r\n \"type\": \"string\",\r\n \"description\": \"Date the order was requested\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"isRotRutDeductable\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether the order is ROT/RUT deductible\"\r\n },\r\n \"orderQty\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total quantity of inventory items in the order\",\r\n \"format\": \"double\"\r\n },\r\n \"note\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any notes on the order\",\r\n \"nullable\": true\r\n },\r\n \"currencyId\": {\r\n \"type\": \"string\",\r\n \"description\": \"CurrencyId for the order.\",\r\n \"nullable\": true\r\n },\r\n \"useReplacementCostForMarginAndProfit\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"When this option is set to `true`, the `costTotal` of the order will be calculated based on `replacementUnitCost`.\\r\\nIf option is set to `false`, the `costTotal` will be calculated based on `unitCost`\",\r\n \"nullable\": true\r\n },\r\n \"createdBy\": {\r\n \"type\": \"string\",\r\n \"description\": \"The user name of the creator of the order. If the order was created by an API call this field will be null or empty.\",\r\n \"nullable\": true\r\n },\r\n \"project\": {\r\n \"$ref\": \"#/components/schemas/ProjectDto\"\r\n },\r\n \"print\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderPrintDto\"\r\n },\r\n \"billing\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderBillingDto\"\r\n },\r\n \"paymentSettings\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderPaymentDto\"\r\n },\r\n \"financialInformation\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderFinancialInfoDto\"\r\n },\r\n \"owner\": {\r\n \"$ref\": \"#/components/schemas/EmployeeDto\"\r\n },\r\n \"origin\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderOriginDto\"\r\n },\r\n \"shipping\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderShippingDto\"\r\n },\r\n \"status\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderStatusDto\"\r\n },\r\n \"customer\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderCustomerDto\"\r\n },\r\n \"totals\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderTotalsDto\"\r\n },\r\n \"version\": {\r\n \"type\": \"string\",\r\n \"description\": \"An internal order version used for detecting concurrent updates to an order\",\r\n \"format\": \"byte\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderExpansions\": {\r\n \"enum\": [\r\n \"None\",\r\n \"Billing\",\r\n \"Payment\",\r\n \"FinancialInformation\",\r\n \"Shipping\",\r\n \"Customer\",\r\n \"Owner\",\r\n \"Origin\",\r\n \"Note\",\r\n \"All\"\r\n ],\r\n \"type\": \"string\",\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.SalesOrderExpansions enumeration defines individual parts of the Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDto that can be filled\"\r\n },\r\n \"SalesOrderFinancialInfoDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"invoiceSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether the order should be invoiced separately\"\r\n },\r\n \"invoiceId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id of the invoice issued for the order\",\r\n \"nullable\": true\r\n },\r\n \"invoiceDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The invoice date\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"dueDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The due date for the invoice\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"terms\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"cashDiscountDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date for the cash discount\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"postPeriod\": {\r\n \"type\": \"string\",\r\n \"description\": \"The post period for the invoice\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderLineDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lineId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The line number of the sales order line\",\r\n \"format\": \"int32\"\r\n },\r\n \"sortOrder\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Used to apply sort order to a set of lines\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"lineType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of sales order line\",\r\n \"nullable\": true\r\n },\r\n \"operation\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of operation the line represents to the order\",\r\n \"nullable\": true\r\n },\r\n \"orderDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date the order line was added\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"inventory\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineInventoryDto\"\r\n },\r\n \"unitOfMeasure\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unit of measure (UOM) for the sales order line\",\r\n \"nullable\": true\r\n },\r\n \"quantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of unit of measure this line represents\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"baseOrderQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The base order quantity for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"unitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The unit cost of items on this order line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"unitPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"The unit price for items on this order line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any description for this order line\",\r\n \"nullable\": true\r\n },\r\n \"shippingRule\": {\r\n \"type\": \"string\",\r\n \"description\": \"The shipping rule code for this order line\",\r\n \"nullable\": true\r\n },\r\n \"completed\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this order line is completed or not\",\r\n \"nullable\": true\r\n },\r\n \"extendedPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"The extended price for this sales order line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"lineTotalBeforeDiscount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The line total before any discounts are applied\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The discount amount for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"externalLink\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any external link for this sales order line\",\r\n \"nullable\": true\r\n },\r\n \"taxCategoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The Tax Category Id applying to this order line\",\r\n \"nullable\": true\r\n },\r\n \"reasonCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"The reason code\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The Site Id for items on this line\",\r\n \"nullable\": true\r\n },\r\n \"undershipThreshold\": {\r\n \"type\": \"number\",\r\n \"description\": \"The undership threshold value (%)\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"overshipThreshold\": {\r\n \"type\": \"number\",\r\n \"description\": \"The overship threshold value (%)\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"shipDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The expected shipping date for this order line\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"requestDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The request date for this order line\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"note\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any note that has been applied to this order line\",\r\n \"nullable\": true\r\n },\r\n \"salesAccountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The general ledger account this line applies to\",\r\n \"nullable\": true\r\n },\r\n \"subaccount\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"string\"\r\n },\r\n \"description\": \"The general ledger subaccount this line applies to\",\r\n \"nullable\": true\r\n },\r\n \"openQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The open quantity for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"billedQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The billed quantity for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"quantityOnShipments\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity on shipments for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountPercent\": {\r\n \"type\": \"number\",\r\n \"description\": \"Discount percentage applied to this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"Code of discount applied to this line\",\r\n \"nullable\": true\r\n },\r\n \"hasManualDiscount\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Discount is applied manually\"\r\n },\r\n \"freeItem\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether these item(s) are free or not\"\r\n },\r\n \"warehouseLocation\": {\r\n \"$ref\": \"#/components/schemas/LocationDto\"\r\n },\r\n \"replacementUnitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The replacement unit cost of an item. This is set based on the supplier price.\\r\\nIf no supplier price found, the last price of the item's default supplier will be used.\\r\\nIf no default supplier is set, the last cost of the item will be used.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"hasManualPrice\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Unit price is applied manually\"\r\n },\r\n \"inventoryAlternateId\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderLineDtoPagedResult\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"value\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDto\"\r\n },\r\n \"description\": \"Gets or sets the items that are paged\",\r\n \"nullable\": true\r\n },\r\n \"nextPage\": {\r\n \"type\": \"string\",\r\n \"description\": \"Gets or sets the link to the next page with more results. If set to null then no more records are present.\",\r\n \"nullable\": true\r\n },\r\n \"totalCount\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderLineInventoryDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n },\r\n \"baseUnit\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderListDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"_links\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"$ref\": \"#/components/schemas/DtoLink\"\r\n },\r\n \"description\": \"Links applicable for the dto\",\r\n \"nullable\": true\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of the order\",\r\n \"nullable\": true\r\n },\r\n \"orderId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The order id (a.k.a OrderCd) for the order\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"string\",\r\n \"description\": \"The current status of the order\",\r\n \"nullable\": true\r\n },\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"The order date\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"shippingScheduledDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date shipment is scheduled\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"customerId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer Id for the order (a.k.a CustoemrCd)\",\r\n \"nullable\": true\r\n },\r\n \"customerName\": {\r\n \"type\": \"string\",\r\n \"description\": \"The name of the customer as it appears on the order\",\r\n \"nullable\": true\r\n },\r\n \"orderQty\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total number of items on the order\",\r\n \"format\": \"double\"\r\n },\r\n \"orderTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total amount on the order\",\r\n \"format\": \"double\"\r\n },\r\n \"currency\": {\r\n \"type\": \"string\",\r\n \"description\": \"The currency id for the order\",\r\n \"nullable\": true\r\n },\r\n \"location\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer location for this order\",\r\n \"nullable\": true\r\n },\r\n \"requestOn\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date the order is requested\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"customerOrder\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer order link\",\r\n \"nullable\": true\r\n },\r\n \"customerRefNo\": {\r\n \"type\": \"string\",\r\n \"description\": \"The order reference number of the customer\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any description on the order\",\r\n \"nullable\": true\r\n },\r\n \"lastModified\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date and time the order was last modified\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderListDtoPagedResult\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"value\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDto\"\r\n },\r\n \"description\": \"Gets or sets the items that are paged\",\r\n \"nullable\": true\r\n },\r\n \"nextPage\": {\r\n \"type\": \"string\",\r\n \"description\": \"Gets or sets the link to the next page with more results. If set to null then no more records are present.\",\r\n \"nullable\": true\r\n },\r\n \"totalCount\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderOriginDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"_links\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"$ref\": \"#/components/schemas/DtoLink\"\r\n },\r\n \"description\": \"Links applicable for the dto\",\r\n \"nullable\": true\r\n },\r\n \"orderType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The order type code for the origin order\",\r\n \"nullable\": true\r\n },\r\n \"orderId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique id of the origin order\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderPaymentDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"paymentMethod\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"cashAccountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The cash account to use\",\r\n \"nullable\": true\r\n },\r\n \"paymentReference\": {\r\n \"type\": \"string\",\r\n \"description\": \"The payment reference\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderPrintDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"descriptionOnInvoice\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Set to true to print description on the invoice\",\r\n \"nullable\": true\r\n },\r\n \"noteOnInternalDocuments\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Set to true to print note on internal documents\",\r\n \"nullable\": true\r\n },\r\n \"noteOnExternalDocuments\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Set to true to print note on external documents\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderRotRutDistributionDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lineId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Reference to the order line\",\r\n \"format\": \"int32\"\r\n },\r\n \"personalId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The personal id\",\r\n \"nullable\": true\r\n },\r\n \"amount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"extra\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this is extra or not\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderRotRutDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"distributedAutomatically\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether the ROT/RUT is distributed automatically\"\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of ROT/RUT\",\r\n \"nullable\": true\r\n },\r\n \"appartment\": {\r\n \"type\": \"string\",\r\n \"description\": \"The appartment reference\",\r\n \"nullable\": true\r\n },\r\n \"estate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The estate reference\",\r\n \"nullable\": true\r\n },\r\n \"organizationNumber\": {\r\n \"type\": \"string\",\r\n \"description\": \"The organization number\",\r\n \"nullable\": true\r\n },\r\n \"distribution\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderRotRutDistributionDto\"\r\n },\r\n \"description\": \"The distrinbution entries\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderShippingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/ContactDto\"\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/AddressDto\"\r\n },\r\n \"scheduledDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The shipping scheduled date\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"shipSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this order can/is shipped separately\"\r\n },\r\n \"rule\": {\r\n \"type\": \"string\",\r\n \"description\": \"The shipping rule\",\r\n \"nullable\": true\r\n },\r\n \"preferredWarehouse\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"shipVia\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"fobPoint\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"terms\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"zone\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"residentialDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this is residential delivery\"\r\n },\r\n \"saturdayDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this is a saturday delivery\"\r\n },\r\n \"insurance\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether insurance applies to this shipping\"\r\n },\r\n \"intrastatTransactionType\": {\r\n \"$ref\": \"#/components/schemas/IdDescriptionPairDto\"\r\n },\r\n \"priority\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Priority of the order\",\r\n \"format\": \"int32\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderStatusDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The status code for the order\",\r\n \"nullable\": true\r\n },\r\n \"cancelled\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this order is in a cancelled state\"\r\n },\r\n \"hold\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this order is in a held state\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderTaxDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"taxId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique tax identifier of the specific tax applied to the document\",\r\n \"nullable\": true\r\n },\r\n \"taxRate\": {\r\n \"type\": \"number\",\r\n \"description\": \"The tax rate used for the tax\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"taxableAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The calculated taxable amount for the specific tax\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"taxAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The calculated tax amount for the specific tax\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"exemptTax\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the taxable amount will be included in taxExemptTotal\"\r\n },\r\n \"includeInTaxable\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the taxable amount will be included in taxableTotal\"\r\n },\r\n \"isPendingTax\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the tax calculated is treated as a pending tax\"\r\n },\r\n \"isStatisticalTax\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the tax calculated is treated as a statistical tax\"\r\n },\r\n \"isReverseTax\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the tax is treated as a reverse tax\"\r\n },\r\n \"taxType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of tax, which can be Sales, Use, VAT or Withholding\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderTaxDto specifies a tax line detail for a sales order\"\r\n },\r\n \"SalesOrderTotalsDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"orderTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The order total\",\r\n \"format\": \"double\"\r\n },\r\n \"orderTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The order total in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"taxableTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The VAT taxable total\",\r\n \"format\": \"double\"\r\n },\r\n \"taxableTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The VAT taxable in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"taxExemptTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The VAT exempt total\",\r\n \"format\": \"double\"\r\n },\r\n \"taxExemptTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The VAT exempt total in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"taxTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The tax total\",\r\n \"format\": \"double\"\r\n },\r\n \"taxTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The tax total in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"discountTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The discount total\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The discount total in base currency\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"costTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total of the costs on the lines of the sales order. How the `costTotal` is calculated is dependent on the option `useReplacementCostForMarginAndProfit`.\\r\\nIf this option is `true` the `costTotal` will be calculated based on the `replacementUnitCost`.\\r\\nIf this option is `false`, the `costTotal` will be calculate based on `unitCost`\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"costTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total of the costs on the lines of the sales order in base currency.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"freightCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight cost calculated for the sales order. Not applicable for transfer order types.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"freightTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight amount calculated in accordance with the shipping terms. Not applicable for transfer order types.\",\r\n \"format\": \"double\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderValidationProblemDetails\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"title\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"detail\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"instance\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"errors\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"nullable\": true,\r\n \"readOnly\": true\r\n },\r\n \"details\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/ValidationErrorCodeDetails\"\r\n },\r\n \"description\": \"List with details for all the validation problems\",\r\n \"nullable\": true,\r\n \"readOnly\": true\r\n }\r\n },\r\n \"additionalProperties\": {},\r\n \"description\": \"Defines an error response for validation problems\"\r\n },\r\n \"ValidationErrorCodeDetails\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"code\": {\r\n \"type\": \"string\",\r\n \"description\": \"Error code\",\r\n \"nullable\": true,\r\n \"example\": \"0001-NullNotAllowed\"\r\n },\r\n \"message\": {\r\n \"type\": \"string\",\r\n \"description\": \"Detailed validation message\",\r\n \"nullable\": true,\r\n \"example\": \"Null value not allowed\"\r\n },\r\n \"parameters\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {},\r\n \"description\": \"Extra parameters related to the validation problem.\\r\\nIf the validation problem refers to a particular field the \\\"property\\\" element will contain the field name\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines details related to validation problems\"\r\n },\r\n \"WarehouseAvailabilityDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalWarehouseId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The internal id used by the system for the warehouse\",\r\n \"format\": \"int32\"\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id (SiteCd) of the warehouse\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description of the warehouse\",\r\n \"nullable\": true\r\n },\r\n \"quantityOnHand\": {\r\n \"type\": \"number\",\r\n \"description\": \"Physical quantity on-hand of items in the specific warehouse\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityAvailable\": {\r\n \"type\": \"number\",\r\n \"description\": \"You can configure the way this estimated quantity is calculated by using availability\\r\\ncalculation rules. The available quantity may include anticipated transactions and therefore\\r\\nmay be less than or greater than the QuantityOnHand. Anticipated transactions correspond\\r\\nto the documents and transactions that have been entered in the system but not yet\\r\\nprocessed to the end.\\r\\nIn the availability calculation settings of an item class, you specify which anticipated\\r\\ntransactions affect the available quantity. Thus, the available quantity may include\\r\\ngoods on purchase orders and exclude the goods allocated for sales orders. You can use\\r\\nthe available quantity as an indicator of demand\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityAvailableForShipment\": {\r\n \"type\": \"number\",\r\n \"description\": \"Estimated quantity calculated by using the following formula: the QuantityOnHand minus the quantity on unreleased inventory\\r\\nissues, minus the quantity allocated for shipping. Thus, the QuantityAvailableForShipment can be less than the QuantityOnHand\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityNotAvailable\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity stored at locations not included in the availability calculation.\\r\\nFor each warehouse location, the 'Include in Qty. Available' check box on the\\r\\nWarehouses(IN204000) screen defines whether the quantity of items stored at this\\r\\nlocation is included in the quantity of available items.\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityPurchaseOrders\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of the inventory item included in open purchase orders.\",\r\n \"format\": \"double\"\r\n },\r\n \"estimatedUnitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The estimated cost per unit, calculated as EstimatedTotalCost/QuantityOnHand\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"estimatedTotalCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total cost for the QuantityOnHand\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"lastModified\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date and time the entry for this warehouse was modified\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"locations\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/LocationAvailabilityDto\"\r\n },\r\n \"description\": \"List of locations in the warehouse for the specific inventory item.\\r\\nNote that this is not returned as part of the response unless expand=Location is specified with the request.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Warehouse information for a specific inventory item\"\r\n }\r\n },\r\n \"securitySchemes\": {\r\n \"oauth2\": {\r\n \"type\": \"oauth2\",\r\n \"description\": \"\",\r\n \"flows\": {\r\n \"clientCredentials\": {\r\n \"tokenUrl\": \"https://connect.visma.com/connect/token\",\r\n \"scopes\": {\r\n \"visma.net.erp.salesorder:read\": \"Read sales order data\",\r\n \"visma.net.erp.salesorder:write\": \"Create or update sales order data\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"x-visma-erp-error-codes\": [\r\n {\r\n \"code\": \"0001-NullNotAllowed\",\r\n \"description\": \"Null value not allowed\"\r\n },\r\n {\r\n \"code\": \"0001-EmptyNotAllowed\",\r\n \"description\": \"Empty value not allowed\"\r\n },\r\n {\r\n \"code\": \"0002-InvalidLength\",\r\n \"description\": \"Invalid length\"\r\n },\r\n {\r\n \"code\": \"0003-InvalidValue\",\r\n \"description\": \"Invalid value\"\r\n },\r\n {\r\n \"code\": \"0100-OutsideValidRange\",\r\n \"description\": \"Value is outside the valid range\"\r\n },\r\n {\r\n \"code\": \"0200-LineIdDoesNotExist\",\r\n \"description\": \" Line Id {0}. Line with provided Id does not exists in the order\"\r\n },\r\n {\r\n \"code\": \"1100-InvalidDiscount\",\r\n \"description\": \"Document/Group discount cannot exceed the line total\"\r\n },\r\n {\r\n \"code\": \"1101-DiscountAmountMoreThanExtPrice\",\r\n \"description\": \"Discount amount can not be greater than Extended Price\"\r\n },\r\n {\r\n \"code\": \"1102-DiscountSetupInvalid\",\r\n \"description\": \"Discount setup is not valid for discounts calculations\"\r\n },\r\n {\r\n \"code\": \"1103-DiscountNotApplicable\",\r\n \"description\": \"Discount can not be applied to line\"\r\n },\r\n {\r\n \"code\": \"1104-FreeItemNotFound\",\r\n \"description\": \"Free item specified in header discount was not found.\"\r\n },\r\n {\r\n \"code\": \"1105-InvalidDiscountCode\",\r\n \"description\": \"Invalid DiscountCode. The Discount is missing or invalid\"\r\n },\r\n {\r\n \"code\": \"1200-SubaccountSegmentInactive\",\r\n \"description\": \"Subaccount segment values inactive\"\r\n },\r\n {\r\n \"code\": \"1201-SubaccountInactive\",\r\n \"description\": \"Subaccount is not Active\"\r\n },\r\n {\r\n \"code\": \"1202-SegmentValueNotFound\",\r\n \"description\": \"Segment value for Subaccount cannot be found\"\r\n },\r\n {\r\n \"code\": \"1203-SubaccountNotFound\",\r\n \"description\": \"Could not find Subaccount segment value\"\r\n },\r\n {\r\n \"code\": \"1204-SubaccountError\",\r\n \"description\": \"Validation errors for the subaccount\"\r\n },\r\n {\r\n \"code\": \"1300-InvalidShipComplete\",\r\n \"description\": \"If require location and not require shipping then ship complete cannot be set to back order allowed\"\r\n },\r\n {\r\n \"code\": \"1400-CustomerLookupException\",\r\n \"description\": \"Exception searching customer\"\r\n },\r\n {\r\n \"code\": \"1401-MissingTermsId\",\r\n \"description\": \"TermsId cannot be empty in the order. Set a default terms on the customer or specify the terms for the order\"\r\n },\r\n {\r\n \"code\": \"1402-PaymentMethodIdNotFound\",\r\n \"description\": \"Payment method set for order can not be found\"\r\n },\r\n {\r\n \"code\": \"1403-InactivePaymentMethodId\",\r\n \"description\": \"Payment methods set for order is inactive\"\r\n },\r\n {\r\n \"code\": \"1404-InvalidPaymentMethodId\",\r\n \"description\": \"Payment method set for order can not be used in sales orders\"\r\n },\r\n {\r\n \"code\": \"1405-PaymentReferenceRequired\",\r\n \"description\": \"Payment reference not set, order type requires it\"\r\n },\r\n {\r\n \"code\": \"1406-PaymentReferenceProhibited\",\r\n \"description\": \"Order type does not allow payment reference\"\r\n },\r\n {\r\n \"code\": \"1407-InvalidCustomerStatus\",\r\n \"description\": \"Invalid Customer Status\"\r\n },\r\n {\r\n \"code\": \"1408-OverrideCurrencyIdProhibited\",\r\n \"description\": \"Currency Id can not be overridden\"\r\n },\r\n {\r\n \"code\": \"1409-PaymentMethodRequired\",\r\n \"description\": \"Payment method not set, order type requires it\"\r\n },\r\n {\r\n \"code\": \"1500-CashAccountRequired\",\r\n \"description\": \"Cash account not set, order type requires it\"\r\n },\r\n {\r\n \"code\": \"1501-CashAccountInactive\",\r\n \"description\": \"Cash account set for order is inactive\"\r\n },\r\n {\r\n \"code\": \"1502-CashAccountNotFound\",\r\n \"description\": \"Cash account set on order can not be found\"\r\n },\r\n {\r\n \"code\": \"1503-CashAccountInvalidForPaymentMethod\",\r\n \"description\": \"Cash account cannot be used with the set Payment Method\"\r\n },\r\n {\r\n \"code\": \"1600-FinancialPeriodNotFound\",\r\n \"description\": \"No financial period that matches the selected Invoice date can be found. Please change the Invoice Date, set the Financial period for the order or create Financial periods\"\r\n },\r\n {\r\n \"code\": \"1601-FinancialPeriodClosed\",\r\n \"description\": \"Financial period '{0}' is closed and cannot be set for order\"\r\n },\r\n {\r\n \"code\": \"1602-FinancialPeriodInactive\",\r\n \"description\": \"Financial period is inactive. Activate it or set another period\"\r\n },\r\n {\r\n \"code\": \"1603-FinancialPeriodNotApplicable\",\r\n \"description\": \"Post period cannot be set for this order type\"\r\n },\r\n {\r\n \"code\": \"1700-WarehouseLocationNotFound\",\r\n \"description\": \"Warehouse location is not found\"\r\n },\r\n {\r\n \"code\": \"1701-WarehouseLocationInactive\",\r\n \"description\": \"Warehouse location is inactive\"\r\n },\r\n {\r\n \"code\": \"1703-WarehouseLocationInvalid\",\r\n \"description\": \"Sales not allowed for warehouse location set for line\"\r\n },\r\n {\r\n \"code\": \"1704-InvalidOrderType\",\r\n \"description\": \"Not possible to update warehouse for line with line number {0}. Setting warehouse location is allowed only for not shippable orders.\"\r\n },\r\n {\r\n \"code\": \"1800-InvalidLineOperation\",\r\n \"description\": \"Given line operation is not accepted for this order type\"\r\n },\r\n {\r\n \"code\": \"1801-MissingReasonCode\",\r\n \"description\": \"Reason code is not set and order type requires it\"\r\n },\r\n {\r\n \"code\": \"1802-InvalidWarehouseId\",\r\n \"description\": \"Invalid Warehouse Id, or Warehouse Id not found\"\r\n },\r\n {\r\n \"code\": \"1803-UniqueInventoryIdNotFound\",\r\n \"description\": \"Cannot find unique InventoryId for inventoryId: '{0}'\"\r\n },\r\n {\r\n \"code\": \"1804-InventoryIdNotFound\",\r\n \"description\": \"InventoryId cannot be found or is invalid\"\r\n },\r\n {\r\n \"code\": \"1805-InvalidTaxCategoryId\",\r\n \"description\": \"Invalid TaxCategoryId, or TaxCategory not found\"\r\n },\r\n {\r\n \"code\": \"1806-InvalidSalesAccountId\",\r\n \"description\": \"Invalid SalesAccountId specified\"\r\n },\r\n {\r\n \"code\": \"1807-InvalidReasonCode\",\r\n \"description\": \"Invalid ReasonCode, or ReasonCode not found\"\r\n },\r\n {\r\n \"code\": \"1808-InvalidUnitOfMeasure\",\r\n \"description\": \"Invalid Unit of Measure\"\r\n },\r\n {\r\n \"code\": \"1809-InvalidQuantityForType\",\r\n \"description\": \"Quantity must be zero or positive when inventory item is not of type MiscCharge\"\r\n },\r\n {\r\n \"code\": \"1810-LineAlreadyCompleted\",\r\n \"description\": \"Line is marked as completed. Patch operation can not be done on completed lines.\"\r\n },\r\n {\r\n \"code\": \"1811-LineAlreadyShippedExternalLink\",\r\n \"description\": \"Not possible to update External Link. Update only accepted for orders, where the updated line has not been shipped\"\r\n },\r\n {\r\n \"code\": \"1812-LineAlreadyShippedSalesAccountId\",\r\n \"description\": \"Not possible to update sales account id. Update only accepted for orders, where the updated line has not been shipped\"\r\n },\r\n {\r\n \"code\": \"1813-InputLinesExceedExistingLinesCount\",\r\n \"description\": \"The number of provided lines exceed existing sales order lines\"\r\n },\r\n {\r\n \"code\": \"1814-ReasonCodePrerequisitesNotMet\",\r\n \"description\": \"The reason code prerequisites for the line does not meet expectations\"\r\n },\r\n {\r\n \"code\": \"1815-SortOrderExceedLinesCount\",\r\n \"description\": \"Cannot set higher sort order number than the number of lines\"\r\n },\r\n {\r\n \"code\": \"1816-SortOrderNbrIsNotUnique\",\r\n \"description\": \"The SortOrder number provided is not unique in your request\"\r\n },\r\n {\r\n \"code\": \"1817-LineIdIsNotUnique\",\r\n \"description\": \"The LineId provided is not unique in your request\"\r\n },\r\n {\r\n \"code\": \"1818-LineAlreadyShippedUnitCost\",\r\n \"description\": \"Not possible to update Unit cost. Update only accepted for orders, where the updated line has not been shipped\"\r\n },\r\n {\r\n \"code\": \"1819-LineAlreadyShippedShippingRule\",\r\n \"description\": \"Not possible to update Shipping rule. Update only accepted for orders, where the updated line has not been shipped\"\r\n },\r\n {\r\n \"code\": \"1820-LineIsFreeItem\",\r\n \"description\": \"Cannot change discount fields for line that is marked as free item line\"\r\n },\r\n {\r\n \"code\": \"1821-InventoryIdFreeItemNotFound\",\r\n \"description\": \"InventoryId for a free Item cannot be found or is invalid\"\r\n },\r\n {\r\n \"code\": \"1822-CanNotUpdateLineLocation\",\r\n \"description\": \"Not possible to update warehouse for line with line number {0}. Update only accepted for orders in statuses Open, On hold, Back ordered, Credit hold and where the updated line has not been shipped and line is not completed.\"\r\n },\r\n {\r\n \"code\": \"1823-DeleteLineWhichIsAlreadyShipped\",\r\n \"description\": \"Cannot delete line that has been shipped\"\r\n },\r\n {\r\n \"code\": \"1824-DeleteLineWhichIsFreeDiscountLine\",\r\n \"description\": \"Cannot delete free item line set from a discount. Please review the discount\"\r\n },\r\n {\r\n \"code\": \"1825-DeleteSalesOrderWithShippedLines\",\r\n \"description\": \"Cannot delete order containing lines that have been shipped\"\r\n },\r\n {\r\n \"code\": \"5000-InvalidAttributeFilter\",\r\n \"description\": \"Invalid attributeFilter\"\r\n },\r\n {\r\n \"code\": \"5001-InvalidAttributeName\",\r\n \"description\": \"The attribute name is invalid. Only characters, digits, or space is allowed\"\r\n }\r\n ]\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": []\r\n }\r\n ]\r\n}", + "url": "https://salesorder.visma.net/swagger/v3/swagger.json", + "output": null, + "newLineBehavior": "Auto" + } + }, + "codeGenerators": { + "openApiToCSharpClient": { + "clientBaseClass": null, + "configurationClass": null, + "generateClientClasses": true, + "generateClientInterfaces": false, + "clientBaseInterface": null, + "injectHttpClient": false, + "disposeHttpClient": true, + "protectedMethods": [], + "generateExceptionClasses": true, + "exceptionClass": "ApiException", + "wrapDtoExceptions": true, + "useHttpClientCreationMethod": false, + "httpClientType": "System.Net.Http.HttpClient", + "useHttpRequestMessageCreationMethod": false, + "useBaseUrl": false, + "generateBaseUrlProperty": true, + "generateSyncMethods": false, + "generatePrepareRequestAndProcessResponseAsAsyncMethods": false, + "exposeJsonSerializerSettings": false, + "clientClassAccessModifier": "public", + "typeAccessModifier": "public", + "generateContractsOutput": true, + "contractsNamespace": "ONIT.VismaNetApi.SalesOrderV3.Models", + "contractsOutputFilePath": "Visma.net/SalesOrderV3/Models/Contracts.cs", + "parameterDateTimeFormat": "s", + "parameterDateFormat": "yyyy-MM-dd", + "generateUpdateJsonSerializerSettingsMethod": true, + "useRequestAndResponseSerializationSettings": false, + "serializeTypeInformation": false, + "queryNullValue": "", + "className": "{controller}ClientSalesOrderV3", + "operationGenerationMode": "SingleClientFromOperationId", + "additionalNamespaceUsages": [], + "additionalContractNamespaceUsages": [], + "generateOptionalParameters": false, + "generateJsonMethods": false, + "enforceFlagEnums": false, + "parameterArrayType": "System.Collections.Generic.IEnumerable", + "parameterDictionaryType": "System.Collections.Generic.IDictionary", + "responseArrayType": "System.Collections.Generic.ICollection", + "responseDictionaryType": "System.Collections.Generic.IDictionary", + "wrapResponses": true, + "wrapResponseMethods": [], + "generateResponseClasses": true, + "responseClass": "SwaggerResponse", + "namespace": "ONIT.VismaNetApi.SalesOrderV3", + "requiredPropertiesMustBeDefined": true, + "dateType": "System.DateTimeOffset", + "jsonConverters": null, + "anyType": "object", + "dateTimeType": "System.DateTimeOffset", + "timeType": "System.TimeSpan", + "timeSpanType": "System.TimeSpan", + "arrayType": "System.Collections.Generic.ICollection", + "arrayInstanceType": "System.Collections.ObjectModel.Collection", + "dictionaryType": "System.Collections.Generic.IDictionary", + "dictionaryInstanceType": "System.Collections.Generic.Dictionary", + "arrayBaseType": "System.Collections.ObjectModel.Collection", + "dictionaryBaseType": "System.Collections.Generic.Dictionary", + "classStyle": "Poco", + "jsonLibrary": "NewtonsoftJson", + "generateDefaultValues": true, + "generateDataAnnotations": true, + "excludedTypeNames": [], + "excludedParameterNames": [], + "handleReferences": false, + "generateImmutableArrayProperties": false, + "generateImmutableDictionaryProperties": false, + "jsonSerializerSettingsTransformationMethod": null, + "inlineNamedArrays": false, + "inlineNamedDictionaries": false, + "inlineNamedTuples": true, + "inlineNamedAny": false, + "generateDtoTypes": true, + "generateOptionalPropertiesAsNullable": false, + "generateNullableReferenceTypes": false, + "templateDirectory": null, + "typeNameGeneratorType": null, + "propertyNameGeneratorType": null, + "enumNameGeneratorType": null, + "serviceHost": null, + "serviceSchemes": null, + "output": "Visma.net/SalesOrderV3/ClientSalesOrderV3.cs", + "newLineBehavior": "Auto" + } + } +} \ No newline at end of file diff --git a/Visma.net/Exceptions/VismaConnectException.cs b/Visma.net/Exceptions/VismaConnectException.cs new file mode 100644 index 0000000..76a9faa --- /dev/null +++ b/Visma.net/Exceptions/VismaConnectException.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace ONIT.VismaNetApi.Exceptions +{ + public class VismaConnectException : Exception + { + private string _jsonResult; + public string jsonResult { get { return _jsonResult; } } + public VismaConnectException() { } + public VismaConnectException(string message) : base(message) { } + public VismaConnectException(string message, Exception inner) : base(message, inner) { } + + public VismaConnectException(string message, string jsonResult) : base(message) + { + _jsonResult= jsonResult; + } + } +} diff --git a/Visma.net/Models/CustomerPayment.cs b/Visma.net/Models/CustomerPayment.cs index 4ab911d..45923e2 100644 --- a/Visma.net/Models/CustomerPayment.cs +++ b/Visma.net/Models/CustomerPayment.cs @@ -23,6 +23,7 @@ public class CustomerPayment : DtoPaginatedProviderBase, IProvideIdentificator public string cashAccount { get => Get(); set => Set(value); } public string currency { get => Get(); set => Set(value); } public decimal paymentAmount { get => Get(); set => Set(value); } + public decimal paymentAmountInCurrency { get => Get(); set => Set(value); } public string invoiceText { get => Get(); set => Set(value); } [JsonProperty] public decimal appliedToDocuments { get; private set; } diff --git a/Visma.net/Models/Helpers/VismaNetAuthorization.cs b/Visma.net/Models/Helpers/VismaNetAuthorization.cs index 3eeedd8..3c3c689 100644 --- a/Visma.net/Models/Helpers/VismaNetAuthorization.cs +++ b/Visma.net/Models/Helpers/VismaNetAuthorization.cs @@ -1,4 +1,5 @@ -using System.Net.Http; +using System; +using System.Net.Http; namespace ONIT.VismaNetApi.Models { @@ -9,5 +10,12 @@ public class VismaNetAuthorization public bool UseProxy { get; set; } public int BranchId { get; set; } public HttpClient HttpClient { get; internal set; } + public string VismaConnectClientId { get; set; } = null; + public string VismaConnectClientSecret { get;set; } = null; + public string VismaConnectTenantId { get; set; } = null; + public string VismaConnectScopes { get; set ;} = "vismanet_erp_service_api:create vismanet_erp_service_api:delete vismanet_erp_service_api:read vismanet_erp_service_api:update"; + public string VismaConnectToken { get; set; } = null; + + public DateTimeOffset VismaConnectTokenExpire { get; set; } } } \ No newline at end of file diff --git a/Visma.net/Models/SupplierPayment.cs b/Visma.net/Models/SupplierPayment.cs index d3acde5..fc0114e 100644 --- a/Visma.net/Models/SupplierPayment.cs +++ b/Visma.net/Models/SupplierPayment.cs @@ -36,6 +36,7 @@ public class SupplierPayment : DtoPaginatedProviderBase, IProvideIdentificator public bool released { get => Get(); set => Set(value); } [JsonProperty] public DateTime lastModifiedDateTime { get; private set; } + public string branch { get => Get(); set => Set(value); } [JsonProperty] public List paymentLines { diff --git a/Visma.net/SalesOrderV3/ClientSalesOrderV3.Extensions.cs b/Visma.net/SalesOrderV3/ClientSalesOrderV3.Extensions.cs new file mode 100644 index 0000000..66bced1 --- /dev/null +++ b/Visma.net/SalesOrderV3/ClientSalesOrderV3.Extensions.cs @@ -0,0 +1,223 @@ +using ONIT.VismaNetApi.Exceptions; +using ONIT.VismaNetApi.Lib; +using ONIT.VismaNetApi.Models; +using ONIT.VismaNetApi.SalesOrderV3.Exceptions; +using ONIT.VismaNetApi.SalesOrderV3.Models; +using System; +using System.CodeDom.Compiler; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Threading; +using System.Threading.Tasks; + +namespace ONIT.VismaNetApi.SalesOrderV3 +{ + public partial class ClientSalesOrderV3 + { + VismaNetAuthorization _authorization; + + public ClientSalesOrderV3(VismaNetAuthorization auth) : this() + { + _authorization = auth; + + } + + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder) + { + urlBuilder.Insert(0, VismaNetControllers.SalesOrderV3BaseUrl); + if (!_authorization.VismaConnectScopes.Contains("visma.net.erp.salesorder")) + { + throw new VismaConnectException("Scope has to contain visma.net.erp.salesorder scopes to use SalesOrderV3"); + } + AddVismaNetAuth(request); + } + + private void AddVismaNetAuth(HttpRequestMessage request) + { + if (_authorization.VismaConnectClientId != null) // new auth via Visma Connect + { + // Check for token expired ( 5 minutes grace ) + if (_authorization.VismaConnectToken == null || _authorization.VismaConnectTokenExpire.AddMinutes(-5) < DateTimeOffset.UtcNow) + { + var vToken = VismaNetApiHelper.GetTokenFromVismaConnect(_authorization.VismaConnectClientId, _authorization.VismaConnectClientSecret, _authorization.VismaConnectTenantId, _authorization.VismaConnectScopes).Result; + _authorization.VismaConnectToken = vToken.access_token; + _authorization.VismaConnectTokenExpire = vToken.expires_on; + } + request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", _authorization.VismaConnectToken); + } + else + { + throw new VismaNetExceptionClientIdMissing(); + } + } + + public async Task> getAllCustomer(string filter = null) + { + int InitialPageSize = 100; + var firstPage = await Customers_GetList_Async(filter, InitialPageSize, 0); + var rsp = new List(); + if (firstPage == null) + return rsp; + + rsp.AddRange(firstPage.Result.Value); + var count = firstPage.Result.Value.Count(); + if (firstPage.Result.TotalCount > count && count > 0) + { + var totalCount = (int)firstPage.Result.TotalCount; + var pageSize = count; + var pageCount = totalCount / pageSize; + var semaphore = new SemaphoreSlim(VismaNet.MaxConcurrentRequests); + var taskList = new List>>(); + foreach (var page in Enumerable.Range(1, pageCount)) + { + await semaphore.WaitAsync(); + taskList.Add(Task.Run(async () => + { + try + { + return await Customers_GetList_Async(filter, pageSize, page); + } + finally + { + semaphore.Release(); + } + })); + } + var tasks = await Task.WhenAll(taskList); + rsp.AddRange(tasks.SelectMany(x => x.Result.Value)); + } + return rsp; + } + + public async Task> getAllSalesOrder(string customerId = null, string status = null, DateTimeOffset? modifiedSince = null, string orderBy = null, string filter = null) + { + int InitialPageSize = 100; + var firstPage = await SalesOrders_GetList_Async(customerId, status, modifiedSince, InitialPageSize, 0, orderBy, filter); + var rsp = new List(); + if (firstPage == null) + return rsp; + + rsp.AddRange(firstPage.Result.Value); + var count = firstPage.Result.Value.Count(); + if (firstPage.Result.TotalCount > count && count > 0) + { + var totalCount = (int)firstPage.Result.TotalCount; + var pageSize = count; + var pageCount = totalCount / pageSize; + var semaphore = new SemaphoreSlim(VismaNet.MaxConcurrentRequests); + var taskList = new List>>(); + foreach (var page in Enumerable.Range(1, pageCount)) + { + await semaphore.WaitAsync(); + taskList.Add(Task.Run(async () => + { + try + { + return await SalesOrders_GetList_Async(customerId, status, modifiedSince, pageSize, page, orderBy, filter); + } + finally + { + semaphore.Release(); + } + })); + } + var tasks = await Task.WhenAll(taskList); + rsp.AddRange(tasks.SelectMany(x => x.Result.Value)); + } + return rsp; + } + + public async Task> getAllSalesOrderOfType(string type, string customerId = null, string status = null, DateTimeOffset? modifiedSince = null, string orderBy = null, string filter = null) + { + int InitialPageSize = 100; + var firstPage = await SalesOrders_GetList_typeAsync(type,customerId, status, modifiedSince, InitialPageSize, 0, orderBy, filter); + var rsp = new List(); + if (firstPage == null) + return rsp; + + rsp.AddRange(firstPage.Result.Value); + var count = firstPage.Result.Value.Count(); + if (firstPage.Result.TotalCount > count && count > 0) + { + var totalCount = (int)firstPage.Result.TotalCount; + var pageSize = count; + var pageCount = totalCount / pageSize; + var semaphore = new SemaphoreSlim(VismaNet.MaxConcurrentRequests); + var taskList = new List>>(); + foreach (var page in Enumerable.Range(1, pageCount)) + { + await semaphore.WaitAsync(); + taskList.Add(Task.Run(async () => + { + try + { + return await SalesOrders_GetList_typeAsync(type, customerId, status, modifiedSince, pageSize, page, orderBy, filter); + } + finally + { + semaphore.Release(); + } + })); + } + var tasks = await Task.WhenAll(taskList); + rsp.AddRange(tasks.SelectMany(x => x.Result.Value)); + } + return rsp; + } + + public async Task> getAllSalesOrderLine(string type = null, string orderId = null) + { + int InitialPageSize = 100; + var firstPage = await SalesOrders_GetItemLines_typeorderIdlinesAsync(type, orderId, InitialPageSize, 0); + var rsp = new List(); + if (firstPage == null) + return rsp; + + rsp.AddRange(firstPage.Result.Value); + var count = firstPage.Result.Value.Count(); + if (firstPage.Result.TotalCount > count && count > 0) + { + var totalCount = (int)firstPage.Result.TotalCount; + var pageSize = count; + var pageCount = totalCount / pageSize; + var semaphore = new SemaphoreSlim(VismaNet.MaxConcurrentRequests); + var taskList = new List>>(); + foreach (var page in Enumerable.Range(1, pageCount)) + { + await semaphore.WaitAsync(); + taskList.Add(Task.Run(async () => + { + try + { + return await SalesOrders_GetItemLines_typeorderIdlinesAsync(type, orderId, InitialPageSize, 0); + } + finally + { + semaphore.Release(); + } + })); + } + var tasks = await Task.WhenAll(taskList); + rsp.AddRange(tasks.SelectMany(x => x.Result.Value)); + } + return rsp; + } + + public async Task createNewSalesOrder(NewSalesOrderCommand newSalesOrder, IEnumerable expansions = null) + { + var resp = await SalesOrders_CreateNewItem_Async(newSalesOrder); + // https://salesorder.visma.net/api/v3/SalesOrders/SO/000223 + var uri = resp.Headers.FirstOrDefault(h => h.Key == "Location").Value.First(); + Uri uri1 = new Uri(uri); + var ordno = uri1.Segments[uri1.Segments.Length - 1].Replace("/", ""); + var type = uri1.Segments[uri1.Segments.Length - 2].Replace("/",""); + var ord = await SalesOrders_GetItemAsync_typeorderIdAsync(type, ordno,expansions); + return ord.Result; + } + + } +} \ No newline at end of file diff --git a/Visma.net/SalesOrderV3/ClientSalesOrderV3.cs b/Visma.net/SalesOrderV3/ClientSalesOrderV3.cs new file mode 100644 index 0000000..9b68e84 --- /dev/null +++ b/Visma.net/SalesOrderV3/ClientSalesOrderV3.cs @@ -0,0 +1,2485 @@ +//---------------------- +// +// Generated using the NSwag toolchain v13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0)) (http://NSwag.org) +// +//---------------------- + +using ONIT.VismaNetApi.SalesOrderV3.Models; + +#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." +#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." +#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' +#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... +#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." +#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" +#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" +#pragma warning disable 8603 // Disable "CS8603 Possible null reference return" + +namespace ONIT.VismaNetApi.SalesOrderV3 +{ + using System = global::System; + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class ClientSalesOrderV3 + { + private System.Lazy _settings; + + public ClientSalesOrderV3() + { + _settings = new System.Lazy(CreateSerializerSettings); + } + + private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() + { + var settings = new Newtonsoft.Json.JsonSerializerSettings(); + UpdateJsonSerializerSettings(settings); + return settings; + } + + protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } + + partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); + + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); + partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); + + /// + /// Gets a list of customers + /// + /// An optional text string to find customers matching (searching fields id, name, gln, tax registration id). If not specified all customers are returned. + /// The number of customers retrieved per page. If not specified, the default value of 100 will be used. + /// The zero based page index to retrieve + /// Returns the list of customers found + /// A server side error occurred. + public virtual System.Threading.Tasks.Task> Customers_GetList_Async(string filter, int? pageSize, int? pageIndex) + { + return Customers_GetList_Async(filter, pageSize, pageIndex, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Gets a list of customers + /// + /// An optional text string to find customers matching (searching fields id, name, gln, tax registration id). If not specified all customers are returned. + /// The number of customers retrieved per page. If not specified, the default value of 100 will be used. + /// The zero based page index to retrieve + /// Returns the list of customers found + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> Customers_GetList_Async(string filter, int? pageSize, int? pageIndex, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append("api/v3/Customers?"); + if (filter != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("filter") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (pageSize != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("pageSize") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (pageIndex != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("pageIndex") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageIndex, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + urlBuilder_.Length--; + + var client_ = new System.Net.Http.HttpClient(); + var disposeClient_ = true; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return new SwaggerResponse(status_, headers_, objectResponse_.Object); + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("If pageSize or pageIndex is not within the allowed range", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Unauthorized", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Forbidden", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// + /// Gets a list of locations for the specified customer + /// + /// The customer id (CustomerCd) to retrieve locations for + /// List of locations for the specified customer + /// A server side error occurred. + public virtual System.Threading.Tasks.Task>> Customers_GetCustomerLocationList_customerIdlocationsAsync(string customerId) + { + return Customers_GetCustomerLocationList_customerIdlocationsAsync(customerId, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Gets a list of locations for the specified customer + /// + /// The customer id (CustomerCd) to retrieve locations for + /// List of locations for the specified customer + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task>> Customers_GetCustomerLocationList_customerIdlocationsAsync(string customerId, System.Threading.CancellationToken cancellationToken) + { + if (customerId == null) + throw new System.ArgumentNullException("customerId"); + + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append("api/v3/Customers/{customerId}/locations"); + urlBuilder_.Replace("{customerId}", System.Uri.EscapeDataString(ConvertToString(customerId, System.Globalization.CultureInfo.InvariantCulture))); + + var client_ = new System.Net.Http.HttpClient(); + var disposeClient_ = true; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return new SwaggerResponse>(status_, headers_, objectResponse_.Object); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("If customer with id customerId is not found or is not accessible", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Unauthorized", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Forbidden", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// + /// Gets an inventory summary for inventory items. + /// + /// A list of zero or more inventory items to get a summary for. If no inventoryId is passed, all inventory items will be included in the response. + /// A list of zero or more warehouses to get a summary for. If no warehouse is supplied, all warehouses will be included in the response. + /// A list of zero or more locations to get a summary for. If no location is supplied, all locations will be included in the response. + /// An additional option to include location detail information with the warehouse summary, or attribute details for the inventory item. If this is not supplied, location information or attributes will not be included in the response. + /// A date/time value for filtering when an inventory item's warehouse or location availability last changed + ///
Unless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone. + /// One or more attribute filter values specified as attribute-id:attribute-value. For example "attributeFilter=WEBSHOP:1&attributeFilter=AnotherAttribute:someValue" + ///
If two attributeFilter values have the same attribute-Id either one need to match. + /// The number of inventory items retrieved per page. If not specified the default pagesize is 10000 items per page + /// Gets or sets the zero based page index to get + /// Returns list of inventory items found + /// A server side error occurred. + public virtual System.Threading.Tasks.Task> Inventory_GetList_Async(System.Collections.Generic.IEnumerable inventoryId, System.Collections.Generic.IEnumerable warehouseId, System.Collections.Generic.IEnumerable locationId, System.Collections.Generic.IEnumerable expand, System.DateTimeOffset? modifiedSince, System.Collections.Generic.IEnumerable attributeFilter, int? pageSize, int? pageIndex) + { + return Inventory_GetList_Async(inventoryId, warehouseId, locationId, expand, modifiedSince, attributeFilter, pageSize, pageIndex, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Gets an inventory summary for inventory items. + /// + /// A list of zero or more inventory items to get a summary for. If no inventoryId is passed, all inventory items will be included in the response. + /// A list of zero or more warehouses to get a summary for. If no warehouse is supplied, all warehouses will be included in the response. + /// A list of zero or more locations to get a summary for. If no location is supplied, all locations will be included in the response. + /// An additional option to include location detail information with the warehouse summary, or attribute details for the inventory item. If this is not supplied, location information or attributes will not be included in the response. + /// A date/time value for filtering when an inventory item's warehouse or location availability last changed + ///
Unless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone. + /// One or more attribute filter values specified as attribute-id:attribute-value. For example "attributeFilter=WEBSHOP:1&attributeFilter=AnotherAttribute:someValue" + ///
If two attributeFilter values have the same attribute-Id either one need to match. + /// The number of inventory items retrieved per page. If not specified the default pagesize is 10000 items per page + /// Gets or sets the zero based page index to get + /// Returns list of inventory items found + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> Inventory_GetList_Async(System.Collections.Generic.IEnumerable inventoryId, System.Collections.Generic.IEnumerable warehouseId, System.Collections.Generic.IEnumerable locationId, System.Collections.Generic.IEnumerable expand, System.DateTimeOffset? modifiedSince, System.Collections.Generic.IEnumerable attributeFilter, int? pageSize, int? pageIndex, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append("api/v3/Inventory?"); + if (inventoryId != null) + { + foreach (var item_ in inventoryId) { urlBuilder_.Append(System.Uri.EscapeDataString("inventoryId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } + } + if (warehouseId != null) + { + foreach (var item_ in warehouseId) { urlBuilder_.Append(System.Uri.EscapeDataString("warehouseId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } + } + if (locationId != null) + { + foreach (var item_ in locationId) { urlBuilder_.Append(System.Uri.EscapeDataString("locationId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } + } + if (expand != null) + { + foreach (var item_ in expand) { urlBuilder_.Append(System.Uri.EscapeDataString("expand") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } + } + if (modifiedSince != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("modifiedSince") + "=").Append(System.Uri.EscapeDataString(modifiedSince.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (attributeFilter != null) + { + foreach (var item_ in attributeFilter) { urlBuilder_.Append(System.Uri.EscapeDataString("attributeFilter") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } + } + if (pageSize != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("pageSize") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (pageIndex != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("pageIndex") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageIndex, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + urlBuilder_.Length--; + + var client_ = new System.Net.Http.HttpClient(); + var disposeClient_ = true; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return new SwaggerResponse(status_, headers_, objectResponse_.Object); + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("If modifiedSince is an invalid date, if expand contains an invalid value, or if any of the supplied attributeFilter(s) are invalid", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Unauthorized", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Forbidden", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// + /// Gets information about a single sales order + /// + /// The type of sales order to get + /// The id of the sales order to get + /// An optional specification of what details to include about the sales order. The default value if not supplied is "None" + /// A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDto if found and accessible + /// A server side error occurred. + public virtual System.Threading.Tasks.Task> SalesOrders_GetItemAsync_typeorderIdAsync(string type, string orderId, System.Collections.Generic.IEnumerable expand) + { + return SalesOrders_GetItemAsync_typeorderIdAsync(type, orderId, expand, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Gets information about a single sales order + /// + /// The type of sales order to get + /// The id of the sales order to get + /// An optional specification of what details to include about the sales order. The default value if not supplied is "None" + /// A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDto if found and accessible + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> SalesOrders_GetItemAsync_typeorderIdAsync(string type, string orderId, System.Collections.Generic.IEnumerable expand, System.Threading.CancellationToken cancellationToken) + { + if (type == null) + throw new System.ArgumentNullException("type"); + + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append("api/v3/SalesOrders/{type}/{orderId}?"); + urlBuilder_.Replace("{type}", System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Replace("{orderId}", System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + if (expand != null) + { + foreach (var item_ in expand) { urlBuilder_.Append(System.Uri.EscapeDataString("expand") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } + } + urlBuilder_.Length--; + + var client_ = new System.Net.Http.HttpClient(); + var disposeClient_ = true; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return new SwaggerResponse(status_, headers_, objectResponse_.Object); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("If an order with type type and orderId is not found, or is not accessible.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Unauthorized", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Forbidden", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// + /// Make modifications to an existing sales order + /// + /// The type of the order to make modifications to + /// The order number to make modifications to + /// Data to change about the sales order + /// The order was modified successfully + /// A server side error occurred. + public virtual System.Threading.Tasks.Task SalesOrders_Patch_typeorderIdAsync(string type, string orderId, PatchSalesOrderCommand body) + { + return SalesOrders_Patch_typeorderIdAsync(type, orderId, body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Make modifications to an existing sales order + /// + /// The type of the order to make modifications to + /// The order number to make modifications to + /// Data to change about the sales order + /// The order was modified successfully + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task SalesOrders_Patch_typeorderIdAsync(string type, string orderId, PatchSalesOrderCommand body, System.Threading.CancellationToken cancellationToken) + { + if (type == null) + throw new System.ArgumentNullException("type"); + + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append("api/v3/SalesOrders/{type}/{orderId}"); + urlBuilder_.Replace("{type}", System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Replace("{orderId}", System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + + var client_ = new System.Net.Http.HttpClient(); + var disposeClient_ = true; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PATCH"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 202) + { + return new SwaggerResponse(status_, headers_); + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("If any of values in command is outside the allowed range\r\n See #/components/x-visma-erp-error-codes for the full list of error codes.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("The order specified was not found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 405) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Method Not Allowed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 412) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Order version does not match with If-Match header", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 428) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("If-Match header was not supplied", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 409) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Conflict", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Unauthorized", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Forbidden", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// + /// Delete an existing sales order + /// + /// The type of the order to delete + /// The order number to delete + /// The order was deleted successfully + /// A server side error occurred. + public virtual System.Threading.Tasks.Task SalesOrders_Delete_typeorderIdAsync(string type, string orderId) + { + return SalesOrders_Delete_typeorderIdAsync(type, orderId, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Delete an existing sales order + /// + /// The type of the order to delete + /// The order number to delete + /// The order was deleted successfully + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task SalesOrders_Delete_typeorderIdAsync(string type, string orderId, System.Threading.CancellationToken cancellationToken) + { + if (type == null) + throw new System.ArgumentNullException("type"); + + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append("api/v3/SalesOrders/{type}/{orderId}"); + urlBuilder_.Replace("{type}", System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Replace("{orderId}", System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + + var client_ = new System.Net.Http.HttpClient(); + var disposeClient_ = true; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("DELETE"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 202) + { + return new SwaggerResponse(status_, headers_); + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Specified order was not found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 405) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Method Not Allowed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Unauthorized", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Forbidden", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// + /// Gets a paged list with sales orders of a specific type + /// + /// The type of sales orders to get. + /// The customer for which to retrieve orders. If omitted or empty, orders for all customers are included + /// The order status to include in the result. If omitted or empty, orders with any status are included. + /// A date/time value for filtering when a sales order last changed. + ///
Unless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone. + /// The number of customers retrieved per page + /// The zero based page index to retrieve + /// The field to order the list by. Can be one of `created`, `lastModified`, or `orderId` followed by an optional sort direction (`asc` or `desc`), default direction is `asc` (ascending) if not present. + /// A filter for the list, applied to the orderId + /// Returns a list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderListDto found. + /// A server side error occurred. + public virtual System.Threading.Tasks.Task> SalesOrders_GetList_typeAsync(string type, string customerId, string status, System.DateTimeOffset? modifiedSince, int? pageSize, int? pageIndex, string orderBy, string filter) + { + return SalesOrders_GetList_typeAsync(type, customerId, status, modifiedSince, pageSize, pageIndex, orderBy, filter, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Gets a paged list with sales orders of a specific type + /// + /// The type of sales orders to get. + /// The customer for which to retrieve orders. If omitted or empty, orders for all customers are included + /// The order status to include in the result. If omitted or empty, orders with any status are included. + /// A date/time value for filtering when a sales order last changed. + ///
Unless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone. + /// The number of customers retrieved per page + /// The zero based page index to retrieve + /// The field to order the list by. Can be one of `created`, `lastModified`, or `orderId` followed by an optional sort direction (`asc` or `desc`), default direction is `asc` (ascending) if not present. + /// A filter for the list, applied to the orderId + /// Returns a list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderListDto found. + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> SalesOrders_GetList_typeAsync(string type, string customerId, string status, System.DateTimeOffset? modifiedSince, int? pageSize, int? pageIndex, string orderBy, string filter, System.Threading.CancellationToken cancellationToken) + { + if (type == null) + throw new System.ArgumentNullException("type"); + + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append("api/v3/SalesOrders/{type}?"); + urlBuilder_.Replace("{type}", System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); + if (customerId != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("customerId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(customerId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (status != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("status") + "=").Append(System.Uri.EscapeDataString(ConvertToString(status, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (modifiedSince != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("modifiedSince") + "=").Append(System.Uri.EscapeDataString(modifiedSince.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (pageSize != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("pageSize") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (pageIndex != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("pageIndex") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageIndex, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (orderBy != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("orderBy") + "=").Append(System.Uri.EscapeDataString(ConvertToString(orderBy, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (filter != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("filter") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + urlBuilder_.Length--; + + var client_ = new System.Net.Http.HttpClient(); + var disposeClient_ = true; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return new SwaggerResponse(status_, headers_, objectResponse_.Object); + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("If `pageSize` or `pageIndex` is not within the allowed range, or if an invalid `orderBy` is specified", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Unauthorized", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Forbidden", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// + /// Gets a paged list with sales orders of any type + /// + /// The customer for which to retrieve orders. If omitted or empty, orders for all customers are included + /// The order status to include in the result. If omitted or empty, orders with any status are included. + /// A date/time value for filtering when a sales order last changed. + ///
Unless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone. + /// The number of customers retrieved per page + /// The zero based page index to retrieve + /// The field to order the list by. Can be one of `created`, `lastModified`, or `orderId` followed by an optional sort direction (`asc` or `desc`), default direction is `asc` (ascending) if not present. + /// A filter for the list, applied to the orderId + /// Returns a list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderListDto found. + /// A server side error occurred. + public virtual System.Threading.Tasks.Task> SalesOrders_GetList_Async(string customerId, string status, System.DateTimeOffset? modifiedSince, int? pageSize, int? pageIndex, string orderBy, string filter) + { + return SalesOrders_GetList_Async(customerId, status, modifiedSince, pageSize, pageIndex, orderBy, filter, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Gets a paged list with sales orders of any type + /// + /// The customer for which to retrieve orders. If omitted or empty, orders for all customers are included + /// The order status to include in the result. If omitted or empty, orders with any status are included. + /// A date/time value for filtering when a sales order last changed. + ///
Unless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone. + /// The number of customers retrieved per page + /// The zero based page index to retrieve + /// The field to order the list by. Can be one of `created`, `lastModified`, or `orderId` followed by an optional sort direction (`asc` or `desc`), default direction is `asc` (ascending) if not present. + /// A filter for the list, applied to the orderId + /// Returns a list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderListDto found. + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> SalesOrders_GetList_Async(string customerId, string status, System.DateTimeOffset? modifiedSince, int? pageSize, int? pageIndex, string orderBy, string filter, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append("api/v3/SalesOrders?"); + if (customerId != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("customerId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(customerId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (status != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("status") + "=").Append(System.Uri.EscapeDataString(ConvertToString(status, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (modifiedSince != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("modifiedSince") + "=").Append(System.Uri.EscapeDataString(modifiedSince.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (pageSize != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("pageSize") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (pageIndex != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("pageIndex") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageIndex, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (orderBy != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("orderBy") + "=").Append(System.Uri.EscapeDataString(ConvertToString(orderBy, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (filter != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("filter") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + urlBuilder_.Length--; + + var client_ = new System.Net.Http.HttpClient(); + var disposeClient_ = true; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return new SwaggerResponse(status_, headers_, objectResponse_.Object); + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("If `pageSize` or `pageIndex` is not within the allowed range, or if an invalid `orderBy` is specified", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Unauthorized", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Forbidden", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// + /// Adds a new sales order to the system + /// + /// Information about the sales order to create + /// The order was created successfully, and the Location request header contains the address to call to GET the new sales order + /// A server side error occurred. + public virtual System.Threading.Tasks.Task SalesOrders_CreateNewItem_Async(NewSalesOrderCommand body) + { + return SalesOrders_CreateNewItem_Async(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Adds a new sales order to the system + /// + /// Information about the sales order to create + /// The order was created successfully, and the Location request header contains the address to call to GET the new sales order + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task SalesOrders_CreateNewItem_Async(NewSalesOrderCommand body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append("api/v3/SalesOrders"); + + var client_ = new System.Net.Http.HttpClient(); + var disposeClient_ = true; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 201) + { + return new SwaggerResponse(status_, headers_); + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("If any of values in command is not present or active, or is outside the allowed range\r\n See #/components/x-visma-erp-error-codes for the full list of error codes.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 409) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Conflict", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Unauthorized", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Forbidden", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// + /// Gets ROT/RUT information for a single sales order + /// + /// The type of sales order to get + /// The id of the sales order to get + /// A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderRotRutDto if found and accessible + /// A server side error occurred. + public virtual System.Threading.Tasks.Task> SalesOrders_GetItemRotRut_typeorderIdrotrutAsync(string type, string orderId) + { + return SalesOrders_GetItemRotRut_typeorderIdrotrutAsync(type, orderId, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Gets ROT/RUT information for a single sales order + /// + /// The type of sales order to get + /// The id of the sales order to get + /// A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderRotRutDto if found and accessible + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> SalesOrders_GetItemRotRut_typeorderIdrotrutAsync(string type, string orderId, System.Threading.CancellationToken cancellationToken) + { + if (type == null) + throw new System.ArgumentNullException("type"); + + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append("api/v3/SalesOrders/{type}/{orderId}/rotrut"); + urlBuilder_.Replace("{type}", System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Replace("{orderId}", System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + + var client_ = new System.Net.Http.HttpClient(); + var disposeClient_ = true; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return new SwaggerResponse(status_, headers_, objectResponse_.Object); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("If an order with type type and orderId is not found, or is not accessible.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Unauthorized", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Forbidden", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// + /// Gets commission information for a single sales order + /// + /// The type of sales order to get + /// The id of the sales order to get + /// A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderCommissionDto if found and accessible + /// A server side error occurred. + public virtual System.Threading.Tasks.Task>> SalesOrders_GetItemCommissions_typeorderIdcommissionsAsync(string type, string orderId) + { + return SalesOrders_GetItemCommissions_typeorderIdcommissionsAsync(type, orderId, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Gets commission information for a single sales order + /// + /// The type of sales order to get + /// The id of the sales order to get + /// A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderCommissionDto if found and accessible + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task>> SalesOrders_GetItemCommissions_typeorderIdcommissionsAsync(string type, string orderId, System.Threading.CancellationToken cancellationToken) + { + if (type == null) + throw new System.ArgumentNullException("type"); + + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append("api/v3/SalesOrders/{type}/{orderId}/commissions"); + urlBuilder_.Replace("{type}", System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Replace("{orderId}", System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + + var client_ = new System.Net.Http.HttpClient(); + var disposeClient_ = true; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return new SwaggerResponse>(status_, headers_, objectResponse_.Object); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("If an order with type type and orderId is not found, or is not accessible.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Unauthorized", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Forbidden", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// + /// Gets sales order lines for a single sales order + /// + /// The type of sales order to get + /// The id of the sales order to get + /// The number of lines retrieved per page, defaults to 1000 if not specified + /// The zero based page index to retrieve, defaults to 0 if not specified + /// A Visma.net.ERP.SalesOrders.Api.Dto.PagedResult`1 object if sales order is found and accessible + /// A server side error occurred. + public virtual System.Threading.Tasks.Task> SalesOrders_GetItemLines_typeorderIdlinesAsync(string type, string orderId, int? pageSize, int? pageIndex) + { + return SalesOrders_GetItemLines_typeorderIdlinesAsync(type, orderId, pageSize, pageIndex, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Gets sales order lines for a single sales order + /// + /// The type of sales order to get + /// The id of the sales order to get + /// The number of lines retrieved per page, defaults to 1000 if not specified + /// The zero based page index to retrieve, defaults to 0 if not specified + /// A Visma.net.ERP.SalesOrders.Api.Dto.PagedResult`1 object if sales order is found and accessible + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> SalesOrders_GetItemLines_typeorderIdlinesAsync(string type, string orderId, int? pageSize, int? pageIndex, System.Threading.CancellationToken cancellationToken) + { + if (type == null) + throw new System.ArgumentNullException("type"); + + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append("api/v3/SalesOrders/{type}/{orderId}/lines?"); + urlBuilder_.Replace("{type}", System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Replace("{orderId}", System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + if (pageSize != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("pageSize") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (pageIndex != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("pageIndex") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageIndex, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + urlBuilder_.Length--; + + var client_ = new System.Net.Http.HttpClient(); + var disposeClient_ = true; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return new SwaggerResponse(status_, headers_, objectResponse_.Object); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("If an order with type type and orderId is not found, or is not accessible.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Unauthorized", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Forbidden", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// + /// Make modifications to an existing sales order lines + /// + /// The type of the order to make modifications to + /// The order number to make modifications to + /// Data to change about the sales order lines + /// The order was modified successfully + /// A server side error occurred. + public virtual System.Threading.Tasks.Task SalesOrders_PatchLines_typeorderIdlinesAsync(string type, string orderId, PatchSalesOrderLinesCommand body) + { + return SalesOrders_PatchLines_typeorderIdlinesAsync(type, orderId, body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Make modifications to an existing sales order lines + /// + /// The type of the order to make modifications to + /// The order number to make modifications to + /// Data to change about the sales order lines + /// The order was modified successfully + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task SalesOrders_PatchLines_typeorderIdlinesAsync(string type, string orderId, PatchSalesOrderLinesCommand body, System.Threading.CancellationToken cancellationToken) + { + if (type == null) + throw new System.ArgumentNullException("type"); + + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append("api/v3/SalesOrders/{type}/{orderId}/lines"); + urlBuilder_.Replace("{type}", System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Replace("{orderId}", System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + + var client_ = new System.Net.Http.HttpClient(); + var disposeClient_ = true; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PATCH"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 202) + { + return new SwaggerResponse(status_, headers_); + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("If any of values in command is outside the allowed range\r\n See #/components/x-visma-erp-error-codes for the full list of error codes.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("The order specified was not found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 405) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Method Not Allowed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 412) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Order version does not match with If-Match header", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 428) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("If-Match header was not supplied", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Unauthorized", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Forbidden", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// + /// Delete lines from an existing sales order + /// + /// The type of the order to make modifications to + /// The order number to make modifications to + /// Lines to delete with comma seprator. Limit of line ids is 1000. + /// The lines were deleted successfully + /// A server side error occurred. + public virtual System.Threading.Tasks.Task SalesOrders_DeleteLines_typeorderIdlinesAsync(string type, string orderId, System.Collections.Generic.IEnumerable ids) + { + return SalesOrders_DeleteLines_typeorderIdlinesAsync(type, orderId, ids, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Delete lines from an existing sales order + /// + /// The type of the order to make modifications to + /// The order number to make modifications to + /// Lines to delete with comma seprator. Limit of line ids is 1000. + /// The lines were deleted successfully + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task SalesOrders_DeleteLines_typeorderIdlinesAsync(string type, string orderId, System.Collections.Generic.IEnumerable ids, System.Threading.CancellationToken cancellationToken) + { + if (type == null) + throw new System.ArgumentNullException("type"); + + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append("api/v3/SalesOrders/{type}/{orderId}/lines?"); + urlBuilder_.Replace("{type}", System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Replace("{orderId}", System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + if (ids != null) + { + foreach (var item_ in ids) { urlBuilder_.Append(System.Uri.EscapeDataString("ids") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } + } + urlBuilder_.Length--; + + var client_ = new System.Net.Http.HttpClient(); + var disposeClient_ = true; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("DELETE"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 202) + { + return new SwaggerResponse(status_, headers_); + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("If any of values in ids is outside the allowed range\r\n See #/components/x-visma-erp-error-codes for the full list of error codes.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Specified order was not found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 405) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Method Not Allowed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Unauthorized", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Forbidden", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// + /// Adds new lines to a existing sales order in the system + /// + /// Information about the lines to create + /// The order lines where created successfully, and the Location request header contains the address to call to GET the new sales order + /// A server side error occurred. + public virtual System.Threading.Tasks.Task SalesOrders_AddLines_typeorderIdlinesAsync(string type, string orderId, AddSalesOrderLinesCommand body) + { + return SalesOrders_AddLines_typeorderIdlinesAsync(type, orderId, body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Adds new lines to a existing sales order in the system + /// + /// Information about the lines to create + /// The order lines where created successfully, and the Location request header contains the address to call to GET the new sales order + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task SalesOrders_AddLines_typeorderIdlinesAsync(string type, string orderId, AddSalesOrderLinesCommand body, System.Threading.CancellationToken cancellationToken) + { + if (type == null) + throw new System.ArgumentNullException("type"); + + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append("api/v3/SalesOrders/{type}/{orderId}/lines"); + urlBuilder_.Replace("{type}", System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Replace("{orderId}", System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + + var client_ = new System.Net.Http.HttpClient(); + var disposeClient_ = true; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 202) + { + return new SwaggerResponse(status_, headers_); + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("If any of values in command is not present or active, or is outside the allowed range\r\n Specified order was not found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 405) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Method Not Allowed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Unauthorized", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Forbidden", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// + /// Gets a specific sales order line for a single sales order + /// + /// The type of sales order to get + /// The id of the sales order to get + /// The id of the line to get + /// A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderLineDto object if sales order line is found and accessible + /// A server side error occurred. + public virtual System.Threading.Tasks.Task> SalesOrders_GetItemLine_typeorderIdlineslineIdAsync(string type, string orderId, int lineId) + { + return SalesOrders_GetItemLine_typeorderIdlineslineIdAsync(type, orderId, lineId, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Gets a specific sales order line for a single sales order + /// + /// The type of sales order to get + /// The id of the sales order to get + /// The id of the line to get + /// A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderLineDto object if sales order line is found and accessible + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> SalesOrders_GetItemLine_typeorderIdlineslineIdAsync(string type, string orderId, int lineId, System.Threading.CancellationToken cancellationToken) + { + if (type == null) + throw new System.ArgumentNullException("type"); + + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + if (lineId == null) + throw new System.ArgumentNullException("lineId"); + + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append("api/v3/SalesOrders/{type}/{orderId}/lines/{lineId}"); + urlBuilder_.Replace("{type}", System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Replace("{orderId}", System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Replace("{lineId}", System.Uri.EscapeDataString(ConvertToString(lineId, System.Globalization.CultureInfo.InvariantCulture))); + + var client_ = new System.Net.Http.HttpClient(); + var disposeClient_ = true; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return new SwaggerResponse(status_, headers_, objectResponse_.Object); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("If an order with type type and orderId is not found, or is not accessible\r\n or the line with the id lineId is not found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Unauthorized", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Forbidden", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// + /// Gets tax information for a single sales order + /// + /// The type of sales order to get + /// The id of the sales order to get + /// A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderTaxDto if found and accessible + /// A server side error occurred. + public virtual System.Threading.Tasks.Task>> SalesOrders_GetItemTax_typeorderIdtaxAsync(string type, string orderId) + { + return SalesOrders_GetItemTax_typeorderIdtaxAsync(type, orderId, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Gets tax information for a single sales order + /// + /// The type of sales order to get + /// The id of the sales order to get + /// A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderTaxDto if found and accessible + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task>> SalesOrders_GetItemTax_typeorderIdtaxAsync(string type, string orderId, System.Threading.CancellationToken cancellationToken) + { + if (type == null) + throw new System.ArgumentNullException("type"); + + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append("api/v3/SalesOrders/{type}/{orderId}/tax"); + urlBuilder_.Replace("{type}", System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Replace("{orderId}", System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + + var client_ = new System.Net.Http.HttpClient(); + var disposeClient_ = true; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return new SwaggerResponse>(status_, headers_, objectResponse_.Object); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("If an order with type type and orderId is not found, or is not accessible.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Unauthorized", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Forbidden", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// + /// Gets discount details information for a single sales order + /// + /// The type of sales order to get + /// The id of the sales order to get + /// A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDiscountDto if found and accessible + /// A server side error occurred. + public virtual System.Threading.Tasks.Task>> SalesOrders_GetItemDiscounts_typeorderIddiscountsAsync(string type, string orderId) + { + return SalesOrders_GetItemDiscounts_typeorderIddiscountsAsync(type, orderId, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Gets discount details information for a single sales order + /// + /// The type of sales order to get + /// The id of the sales order to get + /// A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDiscountDto if found and accessible + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task>> SalesOrders_GetItemDiscounts_typeorderIddiscountsAsync(string type, string orderId, System.Threading.CancellationToken cancellationToken) + { + if (type == null) + throw new System.ArgumentNullException("type"); + + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append("api/v3/SalesOrders/{type}/{orderId}/discounts"); + urlBuilder_.Replace("{type}", System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Replace("{orderId}", System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + + var client_ = new System.Net.Http.HttpClient(); + var disposeClient_ = true; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return new SwaggerResponse>(status_, headers_, objectResponse_.Object); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("If an order with type type and orderId is not found, or is not accessible.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Unauthorized", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Forbidden", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + protected struct ObjectResponseResult + { + public ObjectResponseResult(T responseObject, string responseText) + { + this.Object = responseObject; + this.Text = responseText; + } + + public T Object { get; } + + public string Text { get; } + } + + public bool ReadResponseAsString { get; set; } + + protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) + { + if (response == null || response.Content == null) + { + return new ObjectResponseResult(default(T), string.Empty); + } + + if (ReadResponseAsString) + { + var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); + return new ObjectResponseResult(typedBody, responseText); + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); + } + } + else + { + try + { + using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) + using (var streamReader = new System.IO.StreamReader(responseStream)) + using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) + { + var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); + var typedBody = serializer.Deserialize(jsonTextReader); + return new ObjectResponseResult(typedBody, string.Empty); + } + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); + } + } + } + + private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) + { + if (value == null) + { + return ""; + } + + if (value is System.Enum) + { + var name = System.Enum.GetName(value.GetType(), value); + if (name != null) + { + var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); + if (field != null) + { + var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) + as System.Runtime.Serialization.EnumMemberAttribute; + if (attribute != null) + { + return attribute.Value != null ? attribute.Value : name; + } + } + + var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); + return converted == null ? string.Empty : converted; + } + } + else if (value is bool) + { + return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); + } + else if (value is byte[]) + { + return System.Convert.ToBase64String((byte[]) value); + } + else if (value.GetType().IsArray) + { + var array = System.Linq.Enumerable.OfType((System.Array) value); + return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); + } + + var result = System.Convert.ToString(value, cultureInfo); + return result == null ? "" : result; + } + } + +} + +#pragma warning restore 1591 +#pragma warning restore 1573 +#pragma warning restore 472 +#pragma warning restore 114 +#pragma warning restore 108 +#pragma warning restore 3016 +#pragma warning restore 8603 \ No newline at end of file diff --git a/Visma.net/SalesOrderV3/Exceptions/VismaNetExceptionClientIdMissing.cs b/Visma.net/SalesOrderV3/Exceptions/VismaNetExceptionClientIdMissing.cs new file mode 100644 index 0000000..a68af2f --- /dev/null +++ b/Visma.net/SalesOrderV3/Exceptions/VismaNetExceptionClientIdMissing.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace ONIT.VismaNetApi.SalesOrderV3.Exceptions +{ + internal class VismaNetExceptionClientIdMissing : System.Exception + { + public VismaNetExceptionClientIdMissing() { } + public VismaNetExceptionClientIdMissing(string message) : base(message) { } + public VismaNetExceptionClientIdMissing(string message, Exception inner) : base(message, inner) { } + } +} diff --git a/Visma.net/SalesOrderV3/Extensions/SalesOrderExtensions.cs b/Visma.net/SalesOrderV3/Extensions/SalesOrderExtensions.cs new file mode 100644 index 0000000..7ea340d --- /dev/null +++ b/Visma.net/SalesOrderV3/Extensions/SalesOrderExtensions.cs @@ -0,0 +1,321 @@ +using ONIT.VismaNetApi.Models.Enums; +using ONIT.VismaNetApi.SalesOrderV3.Models; +using System; +using System.Collections.Generic; +using System.Text; + + +namespace ONIT.VismaNetApi.SalesOrderV3.Extensions +{ + + + public static class SalesOrderExtensions + { + public static NewSalesOrderCommand toV3SalesOrder(this ONIT.VismaNetApi.Models.SalesOrder v2SalesOrder) + { + var v3SalesOrder = new NewSalesOrderCommand(); + if (!string.IsNullOrEmpty(v2SalesOrder.orderNo)) + { + v3SalesOrder.OrderId = v2SalesOrder.orderNo; + } + v3SalesOrder.Customer.Id = v2SalesOrder.customer.number; + v3SalesOrder.Customer.Order = v2SalesOrder.customerOrder; + v3SalesOrder.Customer.TermsId = v2SalesOrder.terms?.id; + if (v2SalesOrder.contactId != 0) + v3SalesOrder.Customer.ContactId = v2SalesOrder.contactId; + v3SalesOrder.Customer.LocationId = v2SalesOrder.location?.id; + v3SalesOrder.Customer.Gln = v2SalesOrder.gln; + v3SalesOrder.Customer.RefNo = v2SalesOrder.customerRefNo; + if (v2SalesOrder.soBillingAddress != null && v2SalesOrder.soBillingAddress.overrideAddress) + { + v3SalesOrder.Billing = new NewSalesOrderBillingDto(); + v3SalesOrder.Billing.Address = new NewSalesOrderAddressDto(); + v3SalesOrder.Billing.Address.Line1 = v2SalesOrder.soBillingAddress.addressLine1; + v3SalesOrder.Billing.Address.Line2 = v2SalesOrder.soBillingAddress.addressLine2; + v3SalesOrder.Billing.Address.Line3 = v2SalesOrder.soBillingAddress.addressLine3; + v3SalesOrder.Billing.Address.PostalCode = v2SalesOrder.soBillingAddress.postalCode; + v3SalesOrder.Billing.Address.City = v2SalesOrder.soBillingAddress.city; + v3SalesOrder.Billing.Address.CountryId = v2SalesOrder.soBillingAddress.country?.id; + v3SalesOrder.Billing.Address.StateId = v2SalesOrder.soBillingAddress.county?.id; + } + + if (v2SalesOrder.soShippingAddress != null && v2SalesOrder.soShippingAddress.overrideAddress) + { + v3SalesOrder.Shipping = new NewSalesOrderShippingDto(); + v3SalesOrder.Shipping.Address = new NewSalesOrderAddressDto(); + v3SalesOrder.Shipping.Address.Line1 = v2SalesOrder.soShippingAddress.addressLine1; + v3SalesOrder.Shipping.Address.Line2 = v2SalesOrder.soShippingAddress.addressLine2; + v3SalesOrder.Shipping.Address.Line3 = v2SalesOrder.soShippingAddress.addressLine3; + v3SalesOrder.Shipping.Address.PostalCode = v2SalesOrder.soShippingAddress.postalCode; + v3SalesOrder.Shipping.Address.City = v2SalesOrder.soShippingAddress.city; + v3SalesOrder.Shipping.Address.CountryId = v2SalesOrder.soShippingAddress.country?.id; + v3SalesOrder.Shipping.Address.StateId = v2SalesOrder.soShippingAddress.county?.id; + } + + if (v2SalesOrder.soBillingContact != null && v2SalesOrder.soBillingContact.overrideContact) + { + if (v3SalesOrder.Billing == null) + v3SalesOrder.Billing = new NewSalesOrderBillingDto(); + v3SalesOrder.Billing.Contact = new NewSalesOrderContactDto(); + v3SalesOrder.Billing.Contact.Attention = v2SalesOrder.soBillingContact.attention; + v3SalesOrder.Billing.Contact.Email = v2SalesOrder.soBillingContact.email; + v3SalesOrder.Billing.Contact.Name = v2SalesOrder.soBillingContact.name; + v3SalesOrder.Billing.Contact.Phone1 = v2SalesOrder.soBillingContact.phone1; + } + if (v2SalesOrder.soShippingContact != null && v2SalesOrder.soShippingContact.overrideContact) + { + if (v3SalesOrder.Shipping == null) + v3SalesOrder.Shipping = new NewSalesOrderShippingDto(); + v3SalesOrder.Shipping.Contact = new NewSalesOrderContactDto(); + v3SalesOrder.Shipping.Contact.Attention = v2SalesOrder.soShippingContact.attention; + v3SalesOrder.Shipping.Contact.Email = v2SalesOrder.soShippingContact.email; + v3SalesOrder.Shipping.Contact.Name = v2SalesOrder.soShippingContact.name; + v3SalesOrder.Shipping.Contact.Phone1 = v2SalesOrder.soShippingContact.phone1; + } + if (v2SalesOrder.cancelBy != default(DateTime)) + { + v3SalesOrder.CancelBy = v2SalesOrder.cancelBy; + } + v3SalesOrder.CurrencyId = v2SalesOrder.currency; + if (v2SalesOrder.date != default(DateTime)) + { + v3SalesOrder.Date = v2SalesOrder.date; + } + v3SalesOrder.Description = v2SalesOrder.description; + v3SalesOrder.Note = v2SalesOrder.note; + v3SalesOrder.OwnerId = v2SalesOrder.owner?.id; + + v3SalesOrder.PaymentSettings = new NewSalesOrderPaymentSettings(); + v3SalesOrder.PaymentSettings.PaymentMethodId = v2SalesOrder.paymentMethod?.id; + v3SalesOrder.PaymentSettings.CashAccountId = v2SalesOrder.cashAccount; + v3SalesOrder.PaymentSettings.PaymentReference = v2SalesOrder.paymentRef; + + v3SalesOrder.Print = new SalesOrderPrintDto(); + v3SalesOrder.Print.NoteOnInternalDocuments = v2SalesOrder.printNoteOnInternalDocuments; + v3SalesOrder.Print.NoteOnExternalDocuments = v2SalesOrder.printNoteOnExternalDocuments; + v3SalesOrder.Print.DescriptionOnInvoice = v2SalesOrder.printDescriptionOnInvoice; + + if (v2SalesOrder.requestOn != default(DateTime)) + v3SalesOrder.RequestOn = v2SalesOrder.requestOn; + + v3SalesOrder.Shipping = new NewSalesOrderShippingDto(); + v3SalesOrder.Shipping.ShipViaId = v2SalesOrder.shipVia?.id; + v3SalesOrder.Shipping.PreferredWarehouseId = v2SalesOrder.preferredWarehouse?.id; + if (v2SalesOrder.schedShipment != default(DateTime)) + v3SalesOrder.Shipping.ScheduledDate = v2SalesOrder.schedShipment; + + v3SalesOrder.Shipping.Insurance = v2SalesOrder.insurance; + v3SalesOrder.Shipping.ResidentialDelivery = v2SalesOrder.residentialDelivery; + v3SalesOrder.Shipping.SaturdayDelivery = v2SalesOrder.saturdayDelivery; + + v3SalesOrder.Status = v2SalesOrder.status; + + v3SalesOrder.TaxZoneId = v2SalesOrder.customerVATZone?.id; + v3SalesOrder.Type = v2SalesOrder.orderType; + + + v3SalesOrder.OrderLines = new List(); + foreach (var l in v2SalesOrder.lines) + { + var newline = new NewSalesOrderLineDto(); + newline.Description = l.lineDescription; + newline.DiscountAmount = l.discountAmount; + newline.DiscountCode = l.discountCode; + newline.DiscountPercent = l.discountPercent; + newline.ExternalLink = l.externalLink; + newline.HasManualDiscount = l.manualDiscount; + newline.InventoryId = l.inventory.number; + newline.Note = l.note; + newline.Operation = l.salesOrderOperation.ToString(); + if (l.overshipThreshold > 0) + newline.OvershipThreshold = l.overshipThreshold; + newline.Quantity = l.quantity; + newline.ReasonCode = l.reasonCode; + if (l.requestedOn != default(DateTime)) + newline.RequestDate = l.requestedOn; + if (l.shipOn != default(DateTime)) + newline.ShipDate = l.shipOn; + + // Todo: Check and fix subaccounts + foreach (var s in l.subaccount.segments) + { + newline.Subaccount.Add(s.segmentId.ToString(), s.segmentValue); + } + + newline.TaxCategoryId = l.taxCategory; + if (l.undershipThreshold> 0) + newline.UndershipThreshold = l.undershipThreshold; + newline.UnitCost = (double)l.unitCost; + newline.UnitPrice = l.unitPrice; + newline.UnitOfMeasure = l.uom; + newline.WarehouseId = l.warehouse?.id; + v3SalesOrder.OrderLines.Add(newline); + } + + return v3SalesOrder; + + } + + public static ONIT.VismaNetApi.Models.SalesOrder fromV3SalesOrder(this ONIT.VismaNetApi.Models.SalesOrder OldV2, SalesOrderDto v3SalesOrder, IEnumerable v3salesOrderLines) + { + ONIT.VismaNetApi.Models.SalesOrder v2SalesOrder; + if (v3SalesOrder.OrderId != null) + { + v2SalesOrder = new VismaNetApi.Models.SalesOrder(v3SalesOrder.OrderId, v3SalesOrder.Type); + } + else + { + v2SalesOrder = new VismaNetApi.Models.SalesOrder(); + } + + v2SalesOrder.customer = v3SalesOrder.Customer.Id; + v2SalesOrder.customerOrder = v3SalesOrder.Customer.Order; + v2SalesOrder.terms = v3SalesOrder.FinancialInformation?.Terms?.Id; + v2SalesOrder.contactId = v2SalesOrder.contactId; + if (v3SalesOrder.Customer.Location != null) + { + v2SalesOrder.location = new VismaNetApi.Models.CustomDto.LocationSummary(); + v2SalesOrder.location.id = v3SalesOrder.Customer.Location.Id; + } + v2SalesOrder.gln = v3SalesOrder.Customer.Location?.Gln; + v2SalesOrder.customerRefNo = v3SalesOrder.Customer.RefNo; + if (v3SalesOrder.Billing.Address != null) + { + v2SalesOrder.soBillingAddress.overrideAddress = v3SalesOrder.Billing.Address.OverridesDefault; + v2SalesOrder.soBillingAddress.addressLine1 = v3SalesOrder.Billing.Address.Line1; + v2SalesOrder.soBillingAddress.addressLine2 = v3SalesOrder.Billing.Address.Line2; + v2SalesOrder.soBillingAddress.addressLine3 = v3SalesOrder.Billing.Address.Line3; + v2SalesOrder.soBillingAddress.postalCode = v3SalesOrder.Billing.Address.PostalCode; + v2SalesOrder.soBillingAddress.city = v3SalesOrder.Billing.Address.City; + v2SalesOrder.soBillingAddress.country = v3SalesOrder.Billing.Address.Country?.Id; + v2SalesOrder.soBillingAddress.county = v3SalesOrder.Billing.Address.County?.Id; + } + + if (v3SalesOrder.Shipping.Address != null) + { + v2SalesOrder.soShippingAddress.overrideAddress = v3SalesOrder.Shipping.Address.OverridesDefault; + v2SalesOrder.soShippingAddress.addressLine1 = v3SalesOrder.Shipping.Address.Line1; + v2SalesOrder.soShippingAddress.addressLine2 = v3SalesOrder.Shipping.Address.Line2; + v2SalesOrder.soShippingAddress.addressLine3 = v3SalesOrder.Shipping.Address.Line3; + v2SalesOrder.soShippingAddress.postalCode = v3SalesOrder.Shipping.Address.PostalCode; + v2SalesOrder.soShippingAddress.city = v3SalesOrder.Shipping.Address.City; + v2SalesOrder.soShippingAddress.country = v3SalesOrder.Shipping.Address.Country?.Id; + v2SalesOrder.soShippingAddress.county = v3SalesOrder.Shipping.Address.County?.Id; + } + + if (v3SalesOrder.Billing.Contact != null) + { + v2SalesOrder.soBillingContact.overrideContact = v3SalesOrder.Billing.Contact.OverridesDefault; + v2SalesOrder.soBillingContact.attention = v3SalesOrder.Billing.Contact.Attention; + v2SalesOrder.soBillingContact.email = v3SalesOrder.Billing.Contact.Email; + v2SalesOrder.soBillingContact.name = v3SalesOrder.Billing.Contact.Name; + v2SalesOrder.soBillingContact.phone1 = v3SalesOrder.Billing.Contact.Phone1; + } + if (v3SalesOrder.Shipping.Contact != null) + { + v2SalesOrder.soShippingContact.overrideContact = v3SalesOrder.Shipping.Contact.OverridesDefault; + v2SalesOrder.soShippingContact.attention = v3SalesOrder.Shipping.Contact.Attention; + v2SalesOrder.soShippingContact.email = v3SalesOrder.Shipping.Contact.Email; + v2SalesOrder.soShippingContact.name = v3SalesOrder.Shipping.Contact.Name; + v2SalesOrder.soShippingContact.phone1 = v3SalesOrder.Shipping.Contact.Phone1; + } + if (v3SalesOrder.CancelBy != null) + { + v2SalesOrder.cancelBy = ((DateTimeOffset)v3SalesOrder.CancelBy).DateTime; + } + v2SalesOrder.currency = v3SalesOrder.CurrencyId; + if (v3SalesOrder.Date != null) + { + v2SalesOrder.date = ((DateTimeOffset)v3SalesOrder.Date).DateTime; + } + v2SalesOrder.description = v3SalesOrder.Description; + v2SalesOrder.note = v3SalesOrder.Note; + + if (v3SalesOrder.PaymentSettings != null) + { + + v2SalesOrder.paymentMethod = v3SalesOrder.PaymentSettings.PaymentMethod.Id; + v2SalesOrder.cashAccount = v3SalesOrder.PaymentSettings.CashAccountId; + v2SalesOrder.paymentRef = v3SalesOrder.PaymentSettings.PaymentReference; + } + + if (v3SalesOrder.Print != null) + { + if (v3SalesOrder.Print.NoteOnInternalDocuments != null) + v2SalesOrder.printNoteOnInternalDocuments = (bool)v3SalesOrder.Print.NoteOnInternalDocuments; + if (v3SalesOrder.Print.NoteOnExternalDocuments != null) + v2SalesOrder.printNoteOnExternalDocuments = (bool)v3SalesOrder.Print.NoteOnExternalDocuments; + if (v3SalesOrder.Print.DescriptionOnInvoice != null) + v2SalesOrder.printDescriptionOnInvoice = (bool)v3SalesOrder.Print.DescriptionOnInvoice; + } + + if (v3SalesOrder.RequestOn != null) + v2SalesOrder.requestOn = ((DateTimeOffset)v3SalesOrder.RequestOn).DateTime; + + + if (v3SalesOrder.Shipping != null) + { + v2SalesOrder.shipVia = v3SalesOrder.Shipping.ShipVia?.Id; + v2SalesOrder.preferredWarehouse = v3SalesOrder.Shipping.PreferredWarehouse?.Id; + if (v3SalesOrder.Shipping.ScheduledDate != null) + v2SalesOrder.schedShipment = ((DateTimeOffset)v3SalesOrder.Shipping.ScheduledDate).DateTime; + + v2SalesOrder.insurance = v3SalesOrder.Shipping.Insurance; + v2SalesOrder.residentialDelivery = v3SalesOrder.Shipping.ResidentialDelivery; + v2SalesOrder.saturdayDelivery = v3SalesOrder.Shipping.SaturdayDelivery; + } + + + v2SalesOrder.customerVATZone = v3SalesOrder.Customer.TaxZone.Id; + v2SalesOrder.orderType = v3SalesOrder.Type; + + + + foreach (var l in v3salesOrderLines) + { + var newline = new VismaNetApi.Models.SalesOrderLine(); + newline.lineDescription = l.Description; + if (l.DiscountAmount != null) + newline.discountAmount = (double)l.DiscountAmount; + newline.discountCode = l.DiscountCode; + if (l.DiscountPercent != null) + newline.discountPercent = (double)l.DiscountPercent; + newline.externalLink = l.ExternalLink; + newline.manualDiscount = l.HasManualDiscount; + newline.inventory = l.Inventory.Id; + newline.note = l.Note; + + if(!string.IsNullOrEmpty(l.Operation)) + newline.salesOrderOperation = l.Operation; + if (l.OvershipThreshold != null) + newline.overshipThreshold = (double)l.OvershipThreshold; + if (l.Quantity != null) + newline.quantity = (double)l.Quantity; + + newline.reasonCode = l.ReasonCode; + if (l.RequestDate != null) + newline.requestedOn = ((DateTimeOffset)l.RequestDate).DateTime; + if (l.ShipDate != null) + newline.shipOn = ((DateTimeOffset)l.ShipDate).DateTime; + + // Todo: Check and fix subaccounts + //foreach (var s in l.subaccount.segments) + //{ + // newline.Subaccount.Add(s.) + //} + newline.taxCategory = l.TaxCategoryId; + if (l.UndershipThreshold != null) + newline.undershipThreshold = (double)l.UndershipThreshold; + if(l.UnitCost != null) + newline.unitCost = (decimal)l.UnitCost; + if(l.UnitPrice != null) + newline.unitPrice = (double)l.UnitPrice; + + newline.uom = l.UnitOfMeasure; + newline.warehouse = l.WarehouseId; + v2SalesOrder.lines.Add(newline); + } + return v2SalesOrder; + } + } +} diff --git a/Visma.net/SalesOrderV3/Helpers/SalesOrderHelper.cs b/Visma.net/SalesOrderV3/Helpers/SalesOrderHelper.cs new file mode 100644 index 0000000..7121197 --- /dev/null +++ b/Visma.net/SalesOrderV3/Helpers/SalesOrderHelper.cs @@ -0,0 +1,17 @@ +using ONIT.VismaNetApi.SalesOrderV3.Models; +using System; +using System.Collections.Generic; +using System.Text; + +namespace ONIT.VismaNetApi.SalesOrderV3.Helpers +{ + public class SalesOrderHelper + { + public static NewSalesOrderCommand CreateV3SalesOrder(ONIT.VismaNetApi.Models.SalesOrder oldOrder) + { + NewSalesOrderCommand newOrder = new NewSalesOrderCommand(); + + return newOrder; + } + } +} diff --git a/Visma.net/SalesOrderV3/Models/Contracts.cs b/Visma.net/SalesOrderV3/Models/Contracts.cs new file mode 100644 index 0000000..5805c79 --- /dev/null +++ b/Visma.net/SalesOrderV3/Models/Contracts.cs @@ -0,0 +1,3297 @@ +//---------------------- +// +// Generated using the NSwag toolchain v13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0)) (http://NSwag.org) +// +//---------------------- + +#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." +#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." +#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' +#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... +#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." +#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" +#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" +#pragma warning disable 8603 // Disable "CS8603 Possible null reference return" + +namespace ONIT.VismaNetApi.SalesOrderV3.Models +{ + using System = global::System; + + + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AddSalesOrderLinesCommand + { + [Newtonsoft.Json.JsonProperty("lines", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Lines { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AddressDto + { + /// + /// The address id + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// Whether this address overrides the default address + /// + [Newtonsoft.Json.JsonProperty("overridesDefault", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool OverridesDefault { get; set; } + + /// + /// Address line 1 + /// + [Newtonsoft.Json.JsonProperty("line1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Line1 { get; set; } + + /// + /// Address line 2 + /// + [Newtonsoft.Json.JsonProperty("line2", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Line2 { get; set; } + + /// + /// Address line 3 + /// + [Newtonsoft.Json.JsonProperty("line3", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Line3 { get; set; } + + /// + /// The postal code + /// + [Newtonsoft.Json.JsonProperty("postalCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PostalCode { get; set; } + + /// + /// The city + /// + [Newtonsoft.Json.JsonProperty("city", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string City { get; set; } + + [Newtonsoft.Json.JsonProperty("country", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CdNamePairDto Country { get; set; } + + [Newtonsoft.Json.JsonProperty("county", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CdNamePairDto County { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class CdDescriptionPairDto + { + /// + /// The id + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// The description + /// + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class CdNamePairDto + { + /// + /// The id + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// The name + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class ContactDto + { + /// + /// The id of the contact + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// Whether this overrides the default contact + /// + [Newtonsoft.Json.JsonProperty("overridesDefault", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool OverridesDefault { get; set; } + + /// + /// The name of the contact + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// Any attention for the contact + /// + [Newtonsoft.Json.JsonProperty("attention", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Attention { get; set; } + + /// + /// The e-mail address of the contact + /// + [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Email { get; set; } + + /// + /// The phone number of the contact + /// + [Newtonsoft.Json.JsonProperty("phone1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Phone1 { get; set; } + + /// + /// The secondary phone number of the contact + /// + [Newtonsoft.Json.JsonProperty("phone2", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Phone2 { get; set; } + + /// + /// The fax number of the contact + /// + [Newtonsoft.Json.JsonProperty("fax", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Fax { get; set; } + + } + + /// + /// The Visma.net.ERP.SalesOrders.Api.Dto.CustomerDto class Defines a customer + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class CustomerDto + { + /// + /// An internal unique id + /// + [Newtonsoft.Json.JsonProperty("internalId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int InternalId { get; set; } + + /// + /// Unique id for the customer + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// The name of the customer + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// The currency Id used by the customer + /// + [Newtonsoft.Json.JsonProperty("currencyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CurrencyId { get; set; } + + /// + /// The class of the customer + /// + [Newtonsoft.Json.JsonProperty("customerClassId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CustomerClassId { get; set; } + + [Newtonsoft.Json.JsonProperty("defaultLocation", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CustomerLocationDto DefaultLocation { get; set; } + + /// + /// The customer's first address line + /// + [Newtonsoft.Json.JsonProperty("addressLine1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string AddressLine1 { get; set; } + + /// + /// The customer's second address line + /// + [Newtonsoft.Json.JsonProperty("addressLine2", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string AddressLine2 { get; set; } + + /// + /// The customer's postal code + /// + [Newtonsoft.Json.JsonProperty("postalCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PostalCode { get; set; } + + /// + /// The customer's country code + /// + [Newtonsoft.Json.JsonProperty("country", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Country { get; set; } + + /// + /// The customer's salutation + /// + [Newtonsoft.Json.JsonProperty("salutation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Salutation { get; set; } + + /// + /// The customer's status code + /// + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Status { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class CustomerDtoPagedResult + { + /// + /// Gets or sets the items that are paged + /// + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Value { get; set; } + + /// + /// Gets or sets the link to the next page with more results. If set to null then no more records are present. + /// + [Newtonsoft.Json.JsonProperty("nextPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string NextPage { get; set; } + + /// + /// Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined + /// + [Newtonsoft.Json.JsonProperty("totalCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? TotalCount { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class CustomerLocationDto + { + /// + /// Location id + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// Location description + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// An internal id of the customer location + /// + [Newtonsoft.Json.JsonProperty("internalId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int InternalId { get; set; } + + /// + /// The country code of the location + /// + [Newtonsoft.Json.JsonProperty("countryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CountryId { get; set; } + + /// + /// The global localization number of the location + /// + [Newtonsoft.Json.JsonProperty("gln", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Gln { get; set; } + + /// + /// The tax registration id of the location + /// + [Newtonsoft.Json.JsonProperty("taxRegistrationId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string TaxRegistrationId { get; set; } + + /// + /// The corporate id of the location + /// + [Newtonsoft.Json.JsonProperty("corporateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CorporateId { get; set; } + + /// + /// The site id of the location + /// + [Newtonsoft.Json.JsonProperty("warehouseId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string WarehouseId { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class CustomerLocationItemDto + { + /// + /// Location id + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// Location description + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// An internal id of the customer location + /// + [Newtonsoft.Json.JsonProperty("internalId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int InternalId { get; set; } + + /// + /// The country code of the location + /// + [Newtonsoft.Json.JsonProperty("countryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CountryId { get; set; } + + /// + /// The global localization number of the location + /// + [Newtonsoft.Json.JsonProperty("gln", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Gln { get; set; } + + /// + /// The tax registration id of the location + /// + [Newtonsoft.Json.JsonProperty("taxRegistrationId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string TaxRegistrationId { get; set; } + + /// + /// The corporate id of the location + /// + [Newtonsoft.Json.JsonProperty("corporateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CorporateId { get; set; } + + /// + /// The site id of the location + /// + [Newtonsoft.Json.JsonProperty("warehouseId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string WarehouseId { get; set; } + + [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public AddressDto Address { get; set; } + + [Newtonsoft.Json.JsonProperty("contact", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ContactDto Contact { get; set; } + + /// + /// Price class + /// + [Newtonsoft.Json.JsonProperty("priceClassId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PriceClassId { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class DtoLink + { + /// + /// A link to the item in question + /// + [Newtonsoft.Json.JsonProperty("href", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Href { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class EmployeeDto + { + /// + /// The internal unique identifier of the employee + /// + [Newtonsoft.Json.JsonProperty("internalId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string InternalId { get; set; } + + /// + /// The identifier of the employee + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class IdDescriptionPairDto + { + /// + /// The id + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// The description + /// + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + } + + /// + /// Defines expansion options for the inventory summary endpoint. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public enum InventoryAvailabilityExpansions + { + + [System.Runtime.Serialization.EnumMember(Value = @"None")] + None = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Location")] + Location = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Attribute")] + Attribute = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"All")] + All = 3, + + } + + /// + /// Inventory summary for a specific inventory item + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class InventoryItemAvailabilityDto + { + /// + /// The inventory id (InventoryCd) + /// + [Newtonsoft.Json.JsonProperty("inventoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string InventoryId { get; set; } + + /// + /// The internal Id used by the system to identify the inventory item + /// + [Newtonsoft.Json.JsonProperty("internalId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int InternalId { get; set; } + + /// + /// The description of the inventory item + /// + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + /// + /// The base unit for the inventory item + /// + [Newtonsoft.Json.JsonProperty("baseUnit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string BaseUnit { get; set; } + + /// + /// Warehouse information for the inventory item + /// + [Newtonsoft.Json.JsonProperty("availability", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Availability { get; set; } + + /// + /// Attributes applied to the inventory item + /// + [Newtonsoft.Json.JsonProperty("attributes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary Attributes { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class InventoryItemAvailabilityDtoPagedResult + { + /// + /// Gets or sets the items that are paged + /// + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Value { get; set; } + + /// + /// Gets or sets the link to the next page with more results. If set to null then no more records are present. + /// + [Newtonsoft.Json.JsonProperty("nextPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string NextPage { get; set; } + + /// + /// Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined + /// + [Newtonsoft.Json.JsonProperty("totalCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? TotalCount { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class LocationAvailabilityDto + { + /// + /// The internal id used by the sytem for this location + /// + [Newtonsoft.Json.JsonProperty("internalLocationId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int InternalLocationId { get; set; } + + /// + /// The location id (LocationCd) for this location + /// + [Newtonsoft.Json.JsonProperty("locationId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string LocationId { get; set; } + + /// + /// The description of the location + /// + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + /// + /// Physical quantity on-hand of items in the specific location + /// + [Newtonsoft.Json.JsonProperty("quantityOnHand", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double QuantityOnHand { get; set; } + + /// + /// You can configure the way this estimated quantity is calculated by using availability + ///
calculation rules. The available quantity may include anticipated transactions and therefore + ///
may be less than or greater than the QuantityOnHand. Anticipated transactions correspond + ///
to the documents and transactions that have been entered in the system but not yet + ///
processed to the end. + ///
In the availability calculation settings of an item class, you specify which anticipated + ///
transactions affect the available quantity. Thus, the available quantity may include + ///
goods on purchase orders and exclude the goods allocated for sales orders. You can use + ///
the available quantity as an indicator of demand. + ///
Note: For quantities on warehouse location level, only quantities added specifically for the location are taken into consideration in quantityAvailable + ///
+ [Newtonsoft.Json.JsonProperty("quantityAvailable", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double QuantityAvailable { get; set; } + + /// + /// The quantity stored at locations not included in the availability calculation. + ///
For each warehouse location, the 'Include in Qty. Available' check box on the + ///
Warehouses(IN204000) screen defines whether the quantity of items stored at this + ///
location is included in the quantity of available items. + ///
+ [Newtonsoft.Json.JsonProperty("quantityNotAvailable", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double QuantityNotAvailable { get; set; } + + /// + /// Estimated quantity calculated by using the following formula: the QuantityOnHand minus the quantity on unreleased inventory + ///
issues, minus the quantity allocated for shipping. Thus, the QuantityAvailableForShipment can be less than the QuantityOnHand. + ///
Note: For quantities on warehouse location level, only quantities added specifically for the location are taken into consideration in quantityAvailableForShipment + ///
+ [Newtonsoft.Json.JsonProperty("quantityAvailableForShipment", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double QuantityAvailableForShipment { get; set; } + + /// + /// The quantity of the inventory item included in open purchase orders. + ///
Note: For quantities on warehouse location level, only quantities added specifically for the location are taken into consideration + ///
+ [Newtonsoft.Json.JsonProperty("quantityPurchaseOrders", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double QuantityPurchaseOrders { get; set; } + + /// + /// Date and time this entry for this location was modified + ///
Unless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("lastModified", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset LastModified { get; set; } + + } + + /// + /// Defines a warehouse location + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class LocationDto + { + /// + /// The id + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// The description + /// + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + } + + /// + /// Defines a new address when creating a sales order. + ///
When the address information is provided, it is expected to provide all needed fields for the address(line1, line2, countryId etc). + ///
No default values from the customer will be set for the non defined address fields. + ///
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class NewSalesOrderAddressDto + { + /// + /// Address line 1 + /// + [Newtonsoft.Json.JsonProperty("line1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(50)] + public string Line1 { get; set; } + + /// + /// Address line 2 + /// + [Newtonsoft.Json.JsonProperty("line2", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(50)] + public string Line2 { get; set; } + + /// + /// Address line 3 + /// + [Newtonsoft.Json.JsonProperty("line3", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(50)] + public string Line3 { get; set; } + + /// + /// The postal code + /// + [Newtonsoft.Json.JsonProperty("postalCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(20)] + public string PostalCode { get; set; } + + /// + /// The city + /// + [Newtonsoft.Json.JsonProperty("city", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(50)] + public string City { get; set; } + + /// + /// The country. Required when setting the address. + /// + [Newtonsoft.Json.JsonProperty("countryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(2)] + public string CountryId { get; set; } + + /// + /// The state + /// + [Newtonsoft.Json.JsonProperty("stateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(50)] + public string StateId { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class NewSalesOrderBillingDto + { + [Newtonsoft.Json.JsonProperty("contact", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public NewSalesOrderContactDto Contact { get; set; } + + [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public NewSalesOrderAddressDto Address { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class NewSalesOrderCommand + { + /// + /// Sets the type id of an active sales order type to create + /// + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public string Type { get; set; } + + /// + /// Sets the new id that should be assigned to the new sales order. + ///
This is required if the specified Visma.net.ERP.SalesOrders.Api.Application.Commands.NewSalesOrder.NewSalesOrderCommand.Type has manual numbering set up. If not it should be null or empty. + ///
+ [Newtonsoft.Json.JsonProperty("orderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(15)] + public string OrderId { get; set; } + + /// + /// Override the CurrencyId for the order. Must be a valid currency Id. If not specified, the customer's currency is used if not null. If null, company base currency is used + /// + [Newtonsoft.Json.JsonProperty("currencyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(5)] + public string CurrencyId { get; set; } + + /// + /// Sets the order date of the order to create. If not supplied, the current date will be used + ///
Unless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Date { get; set; } + + /// + /// Sets the requested on date for the order to create. If not supplied, the current date will be used + ///
Unless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("requestOn", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? RequestOn { get; set; } + + /// + /// Sets the cancel by date for the order to create. If not supplied, the order type's days to keep will be added to the current date to determine the value of this field + ///
Unless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("cancelBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? CancelBy { get; set; } + + /// + /// Sets the description for the order to create + ///
<br>Note that text fields should not contain any personally identifiable or otherwise sensitive data + ///
+ [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(255)] + public string Description { get; set; } + + /// + /// Sets the initial status code for the order. Must be null, empty or one of "Open" or "Hold". If not supplied the value will be determined by the sales order type. + /// + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Status { get; set; } + + [Newtonsoft.Json.JsonProperty("customer", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public NewSalesOrderCustomerDto Customer { get; set; } = new NewSalesOrderCustomerDto(); + + [Newtonsoft.Json.JsonProperty("print", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SalesOrderPrintDto Print { get; set; } + + [Newtonsoft.Json.JsonProperty("shipping", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public NewSalesOrderShippingDto Shipping { get; set; } + + [Newtonsoft.Json.JsonProperty("billing", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public NewSalesOrderBillingDto Billing { get; set; } + + [Newtonsoft.Json.JsonProperty("financialInformation", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public NewSalesOrderFinancialInfoDto FinancialInformation { get; set; } + + /// + /// Sets the owner (employee) for the order + /// + [Newtonsoft.Json.JsonProperty("ownerId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string OwnerId { get; set; } + + /// + /// The lines that are added to the order upon creation + /// + [Newtonsoft.Json.JsonProperty("orderLines", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection OrderLines { get; set; } + + /// + /// Override the TaxZoneId for the order. If not specified, the customer's location's TaxZoneId will be used + /// + [Newtonsoft.Json.JsonProperty("taxZoneId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string TaxZoneId { get; set; } + + /// + /// Any note to apply to the order header. + /// + [Newtonsoft.Json.JsonProperty("note", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(2048)] + public string Note { get; set; } + + [Newtonsoft.Json.JsonProperty("paymentSettings", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public NewSalesOrderPaymentSettings PaymentSettings { get; set; } + + /// + /// When this option is set to `true`, the `costTotal` of the order will be calculated based on `replacementUnitCost`. + ///
If option is set to `false`, the `costTotal` will be calculated based on `unitCost` + ///
+ [Newtonsoft.Json.JsonProperty("useReplacementCostForMarginAndProfit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? UseReplacementCostForMarginAndProfit { get; set; } + + } + + /// + /// Defines a new contact when creating a new sales order. + ///
When the contact information is provided, it is expected to provide all needed fields for the contact(name, attention etc). + ///
No default values from the customer will be set for the non defined contact fields. + ///
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class NewSalesOrderContactDto + { + /// + /// Sets the full name of the contact + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(255)] + public string Name { get; set; } + + /// + /// Sets any attention for the contact + /// + [Newtonsoft.Json.JsonProperty("attention", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(255)] + public string Attention { get; set; } + + /// + /// Sets the primary phone number of the contact + /// + [Newtonsoft.Json.JsonProperty("phone1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(50)] + public string Phone1 { get; set; } + + /// + /// Sets the e-mail address of the contact + /// + [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(255)] + public string Email { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class NewSalesOrderCustomerDto + { + /// + /// The unique id of the the customer + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// The contact id for the customer + /// + [Newtonsoft.Json.JsonProperty("contactId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? ContactId { get; set; } + + /// + /// The customer order text + /// + [Newtonsoft.Json.JsonProperty("order", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(40)] + public string Order { get; set; } + + /// + /// The customer ref number text + /// + [Newtonsoft.Json.JsonProperty("refNo", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(40)] + public string RefNo { get; set; } + + /// + /// Sets the location for the customer supplied to use on the order. + ///
Must be a valid active location for the customer supplied in Visma.net.ERP.SalesOrders.Api.Dto.NewSalesOrder.NewSalesOrderCustomerDto.Id + ///
+ [Newtonsoft.Json.JsonProperty("locationId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string LocationId { get; set; } + + /// + /// Sets the terms to use for the sales order. + ///
Must be a valid terms identifier + ///
+ [Newtonsoft.Json.JsonProperty("termsId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string TermsId { get; set; } + + /// + /// The unique global location number of the customer + /// + [Newtonsoft.Json.JsonProperty("gln", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Gln { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class NewSalesOrderFinancialInfoDto + { + /// + /// Sets if the order should be invoiced/billed separately + /// + [Newtonsoft.Json.JsonProperty("invoiceSeparately", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? InvoiceSeparately { get; set; } + + /// + /// Sets the invoice date of the invoice that will be generated for the order. + ///
Unless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("invoiceDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? InvoiceDate { get; set; } + + /// + /// The reference number of the invoice generated for this order. + ///
This can be used if the numbering sequence assigned to invoices is configured for manual numbering. + ///
+ [Newtonsoft.Json.JsonProperty("invoiceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(15)] + public string InvoiceId { get; set; } + + /// + /// The post period for the invoice. This can be used to override the financial period. Must be a valid existing financial period. + /// + [Newtonsoft.Json.JsonProperty("postPeriod", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(6)] + public string PostPeriod { get; set; } + + /// + /// The due date for the invoice created for the order. Default due date is set according to the credit terms. + ///
Unless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("dueDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? DueDate { get; set; } + + /// + /// The date when the cash discount is available for the invoice created for the order. Default date is set based on the terms selected in the order. + ///
Unless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("cashDiscountDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? CashDiscountDate { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class NewSalesOrderLineDto + { + /// + /// The Inventory Id of the item to add + /// + [Newtonsoft.Json.JsonProperty("inventoryId", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public string InventoryId { get; set; } + + /// + /// Sets the description of the order line item. This will override the default description from the inventory item + ///
<br>Note that text fields should not contain any personally identifiable or otherwise sensitive data + ///
+ [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(256)] + public string Description { get; set; } + + /// + /// Sets the Unit of measure for the line item. This will override the default UOM for the inventory item + /// + [Newtonsoft.Json.JsonProperty("unitOfMeasure", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(6)] + public string UnitOfMeasure { get; set; } + + /// + /// The way the line item should be shipped. This will override the default or the one set on the order head. + ///
<br>One of the following options can be set:<br><list type="bullet"><item><term>CancelRemainder: </term><description>The ordered quantity should be delivered in one shipment</description></item><item><term>BackOrderAllowed: </term><description>The ordered quantity can be delivered in multiple shipments.</description></item><item><term>ShipComplete: </term><description>The ordered quantity should be delivered in one shipment.</description></item></list> + ///
+ [Newtonsoft.Json.JsonProperty("shippingRule", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ShippingRule { get; set; } + + /// + /// Sets the quantity of items on the order line + /// + [Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Quantity { get; set; } + + /// + /// Sets the unit cost of the product on the line. If no cost is set (null or omitted) the cost will be set + ///
according to predefined rules + ///
+ [Newtonsoft.Json.JsonProperty("unitCost", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? UnitCost { get; set; } + + /// + /// Sets the unit price for the product on the line. + ///
If no price is set(null or omitted) the price will be set according to predefined rules based on the inventoryId and the customer. + ///
Note that the behavior of the `unitPrice` field is affected by the `hasManualPrice` option. + ///
If `hasManualPrice` is provided and set to "false", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules. + ///
+ [Newtonsoft.Json.JsonProperty("unitPrice", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? UnitPrice { get; set; } + + /// + /// Sets the external link for the line + /// + [Newtonsoft.Json.JsonProperty("externalLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(255)] + public string ExternalLink { get; set; } + + /// + /// Sets the warehouse the item should be shipped from. This will override the default, or the one set on the order head. + /// + [Newtonsoft.Json.JsonProperty("warehouseId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string WarehouseId { get; set; } + + /// + /// Sets the reason code for the line. This must be one of the selectable reason codes + /// + [Newtonsoft.Json.JsonProperty("reasonCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ReasonCode { get; set; } + + /// + /// Overrides the default tax category id (from customer's class). The value must be one of the selectable Tax Categories + /// + [Newtonsoft.Json.JsonProperty("taxCategoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string TaxCategoryId { get; set; } + + /// + /// Sets the undership threshold in percent. If not set, information from the inventory item is used + /// + [Newtonsoft.Json.JsonProperty("undershipThreshold", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.Range(0D, 100D)] + public double? UndershipThreshold { get; set; } + + /// + /// Sets the overship threshold in percent. If not set, information from the inventory item is used + /// + [Newtonsoft.Json.JsonProperty("overshipThreshold", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.Range(100D, 999D)] + public double? OvershipThreshold { get; set; } + + /// + /// Sets the day the order line should be shipped, so that the customer gets it on the requested date (Ship On). + ///
Unless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("shipDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ShipDate { get; set; } + + /// + /// Sets the date the order line is requested (Requested On) + ///
Unless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("requestDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? RequestDate { get; set; } + + /// + /// Overrides the Sales Account Id of the line. The value must be one of the selectable Accounts. + ///
If not set, a value based on the rules is used + ///
+ [Newtonsoft.Json.JsonProperty("salesAccountId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(10)] + public string SalesAccountId { get; set; } + + /// + /// Overrides the Subaccount setup for the line. + ///
Each entry corresponds to a subaccount id/value pair + ///
+ [Newtonsoft.Json.JsonProperty("subaccount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary Subaccount { get; set; } + + /// + /// Adds a text note to the sales order line. + /// + [Newtonsoft.Json.JsonProperty("note", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(2048)] + public string Note { get; set; } + + /// + /// Sets the discount for the line if applicable. This must be one of the selectable discount codes. + ///
<remarks> + ///
Note that the behavior of the 'discountCode' field is affected by the 'hasManualDiscount' option. + ///
If 'hasManualDiscount' is provided and set to "false", and 'discountCode' is provided, the system will set the discountCode according to the predefined rules. + ///
</remarks> + ///
+ [Newtonsoft.Json.JsonProperty("discountCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(10)] + public string DiscountCode { get; set; } + + /// + /// Sets the manual percentage discount for the line. + ///
<remarks> + ///
Note that the behavior of the 'discountPercent' field is affected by the 'hasManualDiscount' option. + ///
If 'hasManualDiscount' is provided and set to "false", and 'discountPercent' is provided, the system will set the discountPercent according to the predefined rules. + ///
</remarks> + ///
+ [Newtonsoft.Json.JsonProperty("discountPercent", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.Range(-100D, 100D)] + public double? DiscountPercent { get; set; } + + /// + /// Sets the manual currency discount amount for the line. + ///
<remarks> + ///
Note that the behavior of the 'discountAmount' field is affected by the 'hasManualDiscount' option. + ///
If 'hasManualDiscount' is provided and set to "false", and 'discountAmount' is provided, the system will set the discountAmount according to the predefined rules. + ///
</remarks> + ///
+ [Newtonsoft.Json.JsonProperty("discountAmount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? DiscountAmount { get; set; } + + /// + /// Indicates that line level discount is applied manually. + ///
<remarks> + ///
Note that the behavior of the fields 'discountCode', 'discountPercent' and 'discountAmount' is affected by this option. + ///
If 'hasManualDiscount' is provided and set to "false", and discount field(s) is provided, the system will set the line level discounts according to the predefined rules. + ///
</remarks> + ///
+ [Newtonsoft.Json.JsonProperty("hasManualDiscount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? HasManualDiscount { get; set; } + + /// + /// Sets the warehouse location that will be used for the shipment generated for the order the warehouse location Id for this line. This must be a valid location for `warehouseId` and will override the default if set. + /// + [Newtonsoft.Json.JsonProperty("warehouseLocationId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string WarehouseLocationId { get; set; } + + /// + /// The type of operation the line represents to the order. Acceptable values are 'Issue' or 'Receipt'. This must be a valid operation for sales order type. + /// + [Newtonsoft.Json.JsonProperty("operation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Operation { get; set; } + + /// + /// Indicates that the `unitPrice` in this line has been specified manually. + ///
If set to "false", the system updates the unit price in the line according to predefined rules. + ///
Note that the behavior of the field `unitPrice` is affected by this option. + ///
If `hasManualPrice` is provided and set to "false", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules. + ///
+ [Newtonsoft.Json.JsonProperty("hasManualPrice", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? HasManualPrice { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class NewSalesOrderPaymentSettings + { + /// + /// Overrides the default payment method set on the customer. This must be a valid and active payment method id. + /// + [Newtonsoft.Json.JsonProperty("paymentMethodId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PaymentMethodId { get; set; } + + /// + /// The cash account associated with the set payment method. + /// + [Newtonsoft.Json.JsonProperty("cashAccountId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(10)] + public string CashAccountId { get; set; } + + /// + /// Sets the external reference number for the order. This must be set if order type requires it. + /// + [Newtonsoft.Json.JsonProperty("paymentReference", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(40)] + public string PaymentReference { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class NewSalesOrderShippingDto + { + /// + /// Sets the date the shipment is scheduled for + ///
Unless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("scheduledDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ScheduledDate { get; set; } + + /// + /// Sets whether the order should be shipped separately or included in a batch segment + /// + [Newtonsoft.Json.JsonProperty("shipSeparately", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? ShipSeparately { get; set; } + + /// + /// Sets the shipping rule for the order + /// + [Newtonsoft.Json.JsonProperty("rule", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Rule { get; set; } + + [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public NewSalesOrderAddressDto Address { get; set; } + + [Newtonsoft.Json.JsonProperty("contact", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public NewSalesOrderContactDto Contact { get; set; } + + /// + /// Sets the default site for the customer supplied to use on the order. Must be a valid site id + /// + [Newtonsoft.Json.JsonProperty("preferredWarehouseId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(30)] + public string PreferredWarehouseId { get; set; } + + /// + /// Sets the intrastat transaction type id for the sales order, if not supplied the default value from the ordertype will be used. Must be a valid intrastat transaction type id. + /// + [Newtonsoft.Json.JsonProperty("intrastatTransactionTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? IntrastatTransactionTypeId { get; set; } + + /// + /// Sets the unique id that represents the carrier and its service to be used for shipping the ordered goods. + /// + [Newtonsoft.Json.JsonProperty("shipViaId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(15)] + public string ShipViaId { get; set; } + + /// + /// Sets whether this is residential delivery + /// + [Newtonsoft.Json.JsonProperty("residentialDelivery", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? ResidentialDelivery { get; set; } + + /// + /// Sets whether this is a saturday delivery + /// + [Newtonsoft.Json.JsonProperty("saturdayDelivery", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? SaturdayDelivery { get; set; } + + /// + /// Sets whether insurance applies to this shipping + /// + [Newtonsoft.Json.JsonProperty("insurance", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? Insurance { get; set; } + + /// + /// Sets priority of the order + /// + [Newtonsoft.Json.JsonProperty("priority", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Priority { get; set; } + + } + + /// + /// Defines an address when updating a sales order. + ///
Only the provided fields will be changed in address. + ///
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class PatchSalesOrderAddressDto + { + /// + /// Address line 1 + /// + [Newtonsoft.Json.JsonProperty("line1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(50)] + public string Line1 { get; set; } + + /// + /// Address line 2 + /// + [Newtonsoft.Json.JsonProperty("line2", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(50)] + public string Line2 { get; set; } + + /// + /// Address line 3 + /// + [Newtonsoft.Json.JsonProperty("line3", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(50)] + public string Line3 { get; set; } + + /// + /// The postal code + /// + [Newtonsoft.Json.JsonProperty("postalCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(20)] + public string PostalCode { get; set; } + + /// + /// The city + /// + [Newtonsoft.Json.JsonProperty("city", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(50)] + public string City { get; set; } + + /// + /// The state + /// + [Newtonsoft.Json.JsonProperty("stateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(50)] + public string StateId { get; set; } + + /// + /// The country. + /// + [Newtonsoft.Json.JsonProperty("countryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(2)] + public string CountryId { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class PatchSalesOrderBillingDto + { + [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public PatchSalesOrderAddressDto Address { get; set; } + + [Newtonsoft.Json.JsonProperty("contact", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public PatchSalesOrderContactDto Contact { get; set; } + + } + + /// + /// The Visma.net.ERP.SalesOrders.Api.Application.Commands.PatchSalesOrder.PatchSalesOrderCommand is a command for updating parts of a sales order + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class PatchSalesOrderCommand + { + /// + /// Sets the order date of the order. + ///
Unless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Date { get; set; } + + [Newtonsoft.Json.JsonProperty("customer", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public PatchSalesOrderCustomerDto Customer { get; set; } + + /// + /// Override the CurrencyId for the order. Must be a valid currency Id. + /// + [Newtonsoft.Json.JsonProperty("currencyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(5)] + public string CurrencyId { get; set; } + + /// + /// Description for the order + ///
<br>Note that text fields should not contain any personally identifiable or otherwise sensitive data + ///
+ [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(255)] + public string Description { get; set; } + + /// + /// Sets the status code for the order. Must be "Open" or "Hold". + /// + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Status { get; set; } + + [Newtonsoft.Json.JsonProperty("print", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SalesOrderPrintDto Print { get; set; } + + /// + /// Cancel by date for the order. + ///
Unless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("cancelBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? CancelBy { get; set; } + + [Newtonsoft.Json.JsonProperty("shipping", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public PatchSalesOrderShippingDto Shipping { get; set; } + + [Newtonsoft.Json.JsonProperty("billing", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public PatchSalesOrderBillingDto Billing { get; set; } + + /// + /// Sets the owner (employee) for the order + /// + [Newtonsoft.Json.JsonProperty("ownerId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string OwnerId { get; set; } + + /// + /// Sets the requested on date for the order. + ///
Unless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("requestOn", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? RequestOn { get; set; } + + [Newtonsoft.Json.JsonProperty("financialInformation", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public PatchSalesOrderFinancialInfoDto FinancialInformation { get; set; } + + [Newtonsoft.Json.JsonProperty("paymentSettings", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public PatchSalesOrderPaymentSettingsDto PaymentSettings { get; set; } + + /// + /// Any note to apply to the order header. + /// + [Newtonsoft.Json.JsonProperty("note", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(2048)] + public string Note { get; set; } + + /// + /// Override the TaxZoneId for the order + /// + [Newtonsoft.Json.JsonProperty("taxZoneId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string TaxZoneId { get; set; } + + /// + /// When this option is set to `true`, the `costTotal` of the order will be calculated based on `replacementUnitCost`. + ///
If option is set to `false`, the `costTotal` will be calculated based on `unitCost` + ///
+ [Newtonsoft.Json.JsonProperty("useReplacementCostForMarginAndProfit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? UseReplacementCostForMarginAndProfit { get; set; } + + } + + /// + /// Defines an contact when updating a sales order. + ///
Only the provided fields will be changed in contact. + ///
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class PatchSalesOrderContactDto + { + /// + /// Sets the full name of the contact + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(255)] + public string Name { get; set; } + + /// + /// Sets any attention for the contact + /// + [Newtonsoft.Json.JsonProperty("attention", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(255)] + public string Attention { get; set; } + + /// + /// Sets the primary phone number of the contact + /// + [Newtonsoft.Json.JsonProperty("phone1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(50)] + public string Phone1 { get; set; } + + /// + /// Sets the e-mail address of the contact + /// + [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(255)] + public string Email { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class PatchSalesOrderCustomerDto + { + /// + /// The unique id of the the customer + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// The customer ref number text. If null or not supplied the value will not be changed + /// + [Newtonsoft.Json.JsonProperty("refNo", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(40)] + public string RefNo { get; set; } + + /// + /// The customer order text. + /// + [Newtonsoft.Json.JsonProperty("order", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(40)] + public string Order { get; set; } + + /// + /// The contact id for the customer + /// + [Newtonsoft.Json.JsonProperty("contactId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? ContactId { get; set; } + + /// + /// Sets the terms to use for the sales order. + ///
Must be a valid terms identifier + ///
+ [Newtonsoft.Json.JsonProperty("termsId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string TermsId { get; set; } + + /// + /// Sets the location for the customer supplied to use on the order. + ///
Must be a valid active location for the customer/> + ///
+ [Newtonsoft.Json.JsonProperty("locationId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string LocationId { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class PatchSalesOrderFinancialInfoDto + { + /// + /// Sets if the order should be invoiced/billed separately + /// + [Newtonsoft.Json.JsonProperty("invoiceSeparately", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? InvoiceSeparately { get; set; } + + /// + /// Sets the invoice date of the invoice that will be generated for the order. + ///
Unless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("invoiceDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? InvoiceDate { get; set; } + + /// + /// The reference number of the invoice generated for this order. + ///
This can be used if the numbering sequence assigned to invoices is configured for manual numbering. + ///
+ [Newtonsoft.Json.JsonProperty("invoiceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(15)] + public string InvoiceId { get; set; } + + /// + /// The post period for the invoice. This can be used to override the financial period. Must be a valid existing financial period. + /// + [Newtonsoft.Json.JsonProperty("postPeriod", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(6)] + public string PostPeriod { get; set; } + + /// + /// The due date for the invoice created for the order. Default due date is set according to the credit terms. + ///
Unless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("dueDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? DueDate { get; set; } + + /// + /// The date when the cash discount is available for the invoice created for the order. Default date is set based on the terms selected in the order. + ///
Unless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("cashDiscountDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? CashDiscountDate { get; set; } + + } + + /// + /// The sales order line which is set to patch + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class PatchSalesOrderLineDto + { + /// + /// The line id of the line. + /// + [Newtonsoft.Json.JsonProperty("lineId", Required = Newtonsoft.Json.Required.Always)] + public int LineId { get; set; } + + /// + /// Patch the reason code for the line. This must be one of the selectable reason codes + /// + [Newtonsoft.Json.JsonProperty("reasonCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ReasonCode { get; set; } + + /// + /// Sets the description of the order line item. This will override the default description from the inventory item + ///
<br>Note that text fields should not contain any personally identifiable or otherwise sensitive data + ///
+ [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(256)] + public string Description { get; set; } + + /// + /// The way the line item should be shipped. + ///
<br>One of the following options can be set:<br><list type="bullet"><item><term>CancelRemainder: </term><description>The ordered quantity should be delivered in one shipment</description></item><item><term>BackOrderAllowed: </term><description>The ordered quantity can be delivered in multiple shipments.</description></item><item><term>ShipComplete: </term><description>The ordered quantity should be delivered in one shipment.</description></item></list> + ///
+ [Newtonsoft.Json.JsonProperty("shippingRule", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ShippingRule { get; set; } + + /// + /// Sets the unit cost of the product on the line. + /// + [Newtonsoft.Json.JsonProperty("unitCost", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? UnitCost { get; set; } + + /// + /// Sets the undership threshold in percent. If not set, information from the inventory item is used + /// + [Newtonsoft.Json.JsonProperty("undershipThreshold", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.Range(0D, 100D)] + public double? UndershipThreshold { get; set; } + + /// + /// Sets the overship threshold in percent. If not set, information from the inventory item is used + /// + [Newtonsoft.Json.JsonProperty("overshipThreshold", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.Range(100D, 999D)] + public double? OvershipThreshold { get; set; } + + /// + /// Sets the external link for the line + /// + [Newtonsoft.Json.JsonProperty("externalLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(255)] + public string ExternalLink { get; set; } + + /// + /// Any note to apply to the order header. + /// + [Newtonsoft.Json.JsonProperty("note", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(2048)] + public string Note { get; set; } + + /// + /// Overrides the Sales Account Id of the line. The value must be one of the selectable Accounts. + ///
If not set, a value based on the rules is used + ///
+ [Newtonsoft.Json.JsonProperty("salesAccountId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(10)] + public string SalesAccountId { get; set; } + + [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? SortOrder { get; set; } + + /// + /// Sets the day the order line should be shipped, so that the customer gets it on the requested date (Ship On). + ///
Unless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("shipDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ShipDate { get; set; } + + /// + /// Sets the date the order line is requested (Requested On) + ///
Unless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("requestDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? RequestDate { get; set; } + + /// + /// Sets the warehouse location that will be used for the shipment generated for the order the warehouse location Id for this line. + ///
This must be a valid location for `warehouseId` and will override the default if set. + ///
+ [Newtonsoft.Json.JsonProperty("warehouseLocationId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string WarehouseLocationId { get; set; } + + /// + /// Sets the warehouse the item should be shipped from. This will override the default, or the one set on the order head. + /// + [Newtonsoft.Json.JsonProperty("warehouseId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string WarehouseId { get; set; } + + /// + /// Overrides the Subaccount setup for the line. + ///
Each entry corresponds to a subaccount id/value pair + ///
+ [Newtonsoft.Json.JsonProperty("subaccount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary Subaccount { get; set; } + + /// + /// Indicates that line level discount is applied manually. + ///
<remarks> + ///
Note that the behavior of the fields 'discountCode', 'discountPercent' and 'discountAmount' is affected by this option. + ///
If 'hasManualDiscount' is provided and set to "false", and discount field(s) is provided, the system will set the line level discounts according to the predefined rules. + ///
</remarks> + ///
+ [Newtonsoft.Json.JsonProperty("hasManualDiscount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? HasManualDiscount { get; set; } + + /// + /// Sets the manual percentage discount for the line. + ///
<remarks> + ///
Note that the behavior of the 'discountPercent' field is affected by the 'hasManualDiscount' option. + ///
If 'hasManualDiscount' is provided and set to "false", and 'discountPercent' is provided, the system will set the discountPercent according to the predefined rules. + ///
</remarks> + ///
+ [Newtonsoft.Json.JsonProperty("discountPercent", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.Range(-100D, 100D)] + public double? DiscountPercent { get; set; } + + /// + /// Sets the manual currency discount amount for the line. + ///
<remarks> + ///
Note that the behavior of the 'discountAmount' field is affected by the 'hasManualDiscount' option. + ///
If 'hasManualDiscount' is provided and set to "false", and 'discountAmount' is provided, the system will set the discountAmount according to the predefined rules. + ///
</remarks> + ///
+ [Newtonsoft.Json.JsonProperty("discountAmount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? DiscountAmount { get; set; } + + /// + /// Overrides the default tax category id. The value must be one of the selectable Tax Categories + /// + [Newtonsoft.Json.JsonProperty("taxCategoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string TaxCategoryId { get; set; } + + /// + /// Sets the discount for the line if applicable. This must be one of the selectable discount codes. + ///
<remarks> + ///
Note that the behavior of the 'discountCode' field is affected by the 'hasManualDiscount' option. + ///
If 'hasManualDiscount' is provided and set to "false", and 'discountCode' is provided, the system will set the discountCode according to the predefined rules. + ///
</remarks> + ///
+ [Newtonsoft.Json.JsonProperty("discountCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(10)] + public string DiscountCode { get; set; } + + /// + /// Sets the quantity of items on the order line + /// + [Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Quantity { get; set; } + + /// + /// Sets the Unit of measure for the line item. This will override the default UOM for the inventory item + /// + [Newtonsoft.Json.JsonProperty("unitOfMeasure", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(6)] + public string UnitOfMeasure { get; set; } + + /// + /// Sets the unit price for the product on the line. + ///
If no price is set(null or omitted) the price will be set according to predefined rules based on the inventoryId and the customer. + ///
Note that the behavior of the `unitPrice` field is affected by the `hasManualPrice` option. + ///
If `hasManualPrice` is provided and set to "false", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules. + ///
+ [Newtonsoft.Json.JsonProperty("unitPrice", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? UnitPrice { get; set; } + + /// + /// The type of operation the line represents to the order. Acceptable values are 'Issue' or 'Receipt'. This must be a valid operation for sales order type. + /// + [Newtonsoft.Json.JsonProperty("operation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Operation { get; set; } + + /// + /// Indicates that the `unitPrice` in this line has been specified manually. + ///
If set to "false", the system updates the unit price in the line according to predefined rules. + ///
Note that the behavior of the field `unitPrice` is affected by this option. + ///
If `hasManualPrice` is provided and set to "false", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules. + ///
+ [Newtonsoft.Json.JsonProperty("hasManualPrice", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? HasManualPrice { get; set; } + + } + + /// + /// The Visma.net.ERP.SalesOrders.Api.Application.Commands.PatchSalesOrderLines.PatchSalesOrderLinesCommand is a command for updating the lines of a sales order + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class PatchSalesOrderLinesCommand + { + /// + /// The sales order lines that are set to patch + /// + [Newtonsoft.Json.JsonProperty("lines", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Lines { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class PatchSalesOrderPaymentSettingsDto + { + /// + /// Overrides the default payment method set on the customer. This must be a valid and active payment method id. + /// + [Newtonsoft.Json.JsonProperty("paymentMethodId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PaymentMethodId { get; set; } + + /// + /// The cash account associated with the set payment method. + /// + [Newtonsoft.Json.JsonProperty("cashAccountId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(10)] + public string CashAccountId { get; set; } + + /// + /// Sets the external reference number for the order. This must be set if order type requires it. + /// + [Newtonsoft.Json.JsonProperty("paymentReference", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(40)] + public string PaymentReference { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class PatchSalesOrderShippingDto + { + /// + /// Sets whether the order should be shipped separately or included in a batch segment + /// + [Newtonsoft.Json.JsonProperty("shipSeparately", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? ShipSeparately { get; set; } + + [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public PatchSalesOrderAddressDto Address { get; set; } + + [Newtonsoft.Json.JsonProperty("contact", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public PatchSalesOrderContactDto Contact { get; set; } + + /// + /// Sets the default site for the customer supplied to use on the order. Must be a valid site id + ///
If empty string, the default site for order will be removed + ///
+ [Newtonsoft.Json.JsonProperty("preferredWarehouseId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(30)] + public string PreferredWarehouseId { get; set; } + + /// + /// Sets the shipping rule for the order + /// + [Newtonsoft.Json.JsonProperty("rule", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Rule { get; set; } + + /// + /// Sets the date the shipment is scheduled for + ///
Unless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("scheduledDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ScheduledDate { get; set; } + + /// + /// Sets the intrastat transaction type id for the sales order. Must be a valid intrastat transaction type id. + /// + [Newtonsoft.Json.JsonProperty("intrastatTransactionTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? IntrastatTransactionTypeId { get; set; } + + /// + /// Sets the unique id that represents the carrier and its service to be used for shipping the ordered goods. Must be a valid carrier id. + ///
If empty string then the value will be set to null + ///
+ [Newtonsoft.Json.JsonProperty("shipViaId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(15)] + public string ShipViaId { get; set; } + + /// + /// Sets whether this is residential delivery + /// + [Newtonsoft.Json.JsonProperty("residentialDelivery", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? ResidentialDelivery { get; set; } + + /// + /// Sets whether this is a saturday delivery + /// + [Newtonsoft.Json.JsonProperty("saturdayDelivery", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? SaturdayDelivery { get; set; } + + /// + /// Sets whether insurance applies to this shipping + /// + [Newtonsoft.Json.JsonProperty("insurance", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? Insurance { get; set; } + + /// + /// Sets priority of the order + /// + [Newtonsoft.Json.JsonProperty("priority", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Priority { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class ProblemDetails + { + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + [Newtonsoft.Json.JsonProperty("title", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Title { get; set; } + + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Status { get; set; } + + [Newtonsoft.Json.JsonProperty("detail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Detail { get; set; } + + [Newtonsoft.Json.JsonProperty("instance", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Instance { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties; } + set { _additionalProperties = value; } + } + + } + + /// + /// The Visma.net.ERP.SalesOrders.Api.Dto.ProjectDto class defines a project reference for a sales order + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class ProjectDto + { + /// + /// The id + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// The description + /// + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + /// + /// An internal unique identifier of the project + /// + [Newtonsoft.Json.JsonProperty("internalId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int InternalId { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderBillingDto + { + [Newtonsoft.Json.JsonProperty("contact", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ContactDto Contact { get; set; } + + [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public AddressDto Address { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderCommissionDto + { + /// + /// The id of the sales person that gets the commision + /// + [Newtonsoft.Json.JsonProperty("salesPersonId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int SalesPersonId { get; set; } + + /// + /// The commission percent + /// + [Newtonsoft.Json.JsonProperty("percent", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Percent { get; set; } + + /// + /// The commission amount + /// + [Newtonsoft.Json.JsonProperty("amount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Amount { get; set; } + + /// + /// The order's commisionable amount + /// + [Newtonsoft.Json.JsonProperty("commissionableAmount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? CommissionableAmount { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderCustomerDto + { + /// + /// An internal unique id of the customer + /// + [Newtonsoft.Json.JsonProperty("internalId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int InternalId { get; set; } + + /// + /// The unique id of the the customer + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// The customer name + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("taxZone", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CdDescriptionPairDto TaxZone { get; set; } + + /// + /// The contact id for the customer + /// + [Newtonsoft.Json.JsonProperty("contactId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? ContactId { get; set; } + + /// + /// The customer order text + /// + [Newtonsoft.Json.JsonProperty("order", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Order { get; set; } + + /// + /// The customer ref number text + /// + [Newtonsoft.Json.JsonProperty("refNo", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string RefNo { get; set; } + + [Newtonsoft.Json.JsonProperty("location", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CustomerLocationDto Location { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderDiscountDto + { + /// + /// The number of discount line set for the order + /// + [Newtonsoft.Json.JsonProperty("manualOrderIndex", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int ManualOrderIndex { get; set; } + + /// + /// Indicates if the discount has been cancelled for the order and is not applicable + /// + [Newtonsoft.Json.JsonProperty("skipDiscount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool SkipDiscount { get; set; } + + /// + /// The identifier of the discount applied to the order + /// + [Newtonsoft.Json.JsonProperty("discountId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string DiscountId { get; set; } + + /// + /// The identifier of the discount sequence of the discount ID applied to the order + /// + [Newtonsoft.Json.JsonProperty("discountSequenceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string DiscountSequenceId { get; set; } + + /// + /// The type of discount whose sequence was applied to the document(Group or Document) + /// + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + /// + /// Indicates that the discount has been applied manually + /// + [Newtonsoft.Json.JsonProperty("isManual", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsManual { get; set; } + + /// + /// The amount used as a base for discount calculation if the discount is based on amount. + /// + [Newtonsoft.Json.JsonProperty("discountableAmount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? DiscountableAmount { get; set; } + + /// + /// The quantity used as a base for discount calculation if the discount is based on quantity. + /// + [Newtonsoft.Json.JsonProperty("discountableQuantity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? DiscountableQuantity { get; set; } + + /// + /// The amount of the discount + /// + [Newtonsoft.Json.JsonProperty("discountAmount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? DiscountAmount { get; set; } + + /// + /// The discount percent, if the discount is defined to be calculated as a percentage + /// + [Newtonsoft.Json.JsonProperty("discountPercent", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? DiscountPercent { get; set; } + + [Newtonsoft.Json.JsonProperty("freeItem", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CdDescriptionPairDto FreeItem { get; set; } + + /// + /// The quantity of the free item. Used to set the quantity for the order line generate by a free item discount + /// + [Newtonsoft.Json.JsonProperty("freeItemQuantity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? FreeItemQuantity { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderDto + { + /// + /// The type code for the sales order + /// + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + /// + /// The unique identifier of the order + /// + [Newtonsoft.Json.JsonProperty("orderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string OrderId { get; set; } + + /// + /// Description of the order + /// + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + /// + /// Date the order was submitted + ///
Unless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("date", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Date { get; set; } + + /// + /// The cancel date for the order + ///
Unless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("cancelBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? CancelBy { get; set; } + + /// + /// Date the order was last modified + ///
Unless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("lastModified", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset LastModified { get; set; } + + /// + /// Date the order was requested + ///
Unless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("requestOn", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? RequestOn { get; set; } + + /// + /// Whether the order is ROT/RUT deductible + /// + [Newtonsoft.Json.JsonProperty("isRotRutDeductable", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsRotRutDeductable { get; set; } + + /// + /// The total quantity of inventory items in the order + /// + [Newtonsoft.Json.JsonProperty("orderQty", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double OrderQty { get; set; } + + /// + /// Any notes on the order + /// + [Newtonsoft.Json.JsonProperty("note", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Note { get; set; } + + /// + /// CurrencyId for the order. + /// + [Newtonsoft.Json.JsonProperty("currencyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CurrencyId { get; set; } + + /// + /// When this option is set to `true`, the `costTotal` of the order will be calculated based on `replacementUnitCost`. + ///
If option is set to `false`, the `costTotal` will be calculated based on `unitCost` + ///
+ [Newtonsoft.Json.JsonProperty("useReplacementCostForMarginAndProfit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? UseReplacementCostForMarginAndProfit { get; set; } + + /// + /// The user name of the creator of the order. If the order was created by an API call this field will be null or empty. + /// + [Newtonsoft.Json.JsonProperty("createdBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CreatedBy { get; set; } + + [Newtonsoft.Json.JsonProperty("project", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ProjectDto Project { get; set; } + + [Newtonsoft.Json.JsonProperty("print", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SalesOrderPrintDto Print { get; set; } + + [Newtonsoft.Json.JsonProperty("billing", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SalesOrderBillingDto Billing { get; set; } + + [Newtonsoft.Json.JsonProperty("paymentSettings", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SalesOrderPaymentDto PaymentSettings { get; set; } + + [Newtonsoft.Json.JsonProperty("financialInformation", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SalesOrderFinancialInfoDto FinancialInformation { get; set; } + + [Newtonsoft.Json.JsonProperty("owner", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public EmployeeDto Owner { get; set; } + + [Newtonsoft.Json.JsonProperty("origin", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SalesOrderOriginDto Origin { get; set; } + + [Newtonsoft.Json.JsonProperty("shipping", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SalesOrderShippingDto Shipping { get; set; } + + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SalesOrderStatusDto Status { get; set; } + + [Newtonsoft.Json.JsonProperty("customer", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SalesOrderCustomerDto Customer { get; set; } + + [Newtonsoft.Json.JsonProperty("totals", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SalesOrderTotalsDto Totals { get; set; } + + /// + /// An internal order version used for detecting concurrent updates to an order + /// + [Newtonsoft.Json.JsonProperty("version", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public byte[] Version { get; set; } + + } + + /// + /// The Visma.net.ERP.SalesOrders.Api.Dto.SalesOrderExpansions enumeration defines individual parts of the Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDto that can be filled + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public enum SalesOrderExpansions + { + + [System.Runtime.Serialization.EnumMember(Value = @"None")] + None = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Billing")] + Billing = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Payment")] + Payment = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"FinancialInformation")] + FinancialInformation = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"Shipping")] + Shipping = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"Customer")] + Customer = 5, + + [System.Runtime.Serialization.EnumMember(Value = @"Owner")] + Owner = 6, + + [System.Runtime.Serialization.EnumMember(Value = @"Origin")] + Origin = 7, + + [System.Runtime.Serialization.EnumMember(Value = @"Note")] + Note = 8, + + [System.Runtime.Serialization.EnumMember(Value = @"All")] + All = 9, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderFinancialInfoDto + { + /// + /// Whether the order should be invoiced separately + /// + [Newtonsoft.Json.JsonProperty("invoiceSeparately", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool InvoiceSeparately { get; set; } + + /// + /// The id of the invoice issued for the order + /// + [Newtonsoft.Json.JsonProperty("invoiceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string InvoiceId { get; set; } + + /// + /// The invoice date + ///
Unless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("invoiceDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? InvoiceDate { get; set; } + + /// + /// The due date for the invoice + ///
Unless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("dueDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? DueDate { get; set; } + + [Newtonsoft.Json.JsonProperty("terms", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CdDescriptionPairDto Terms { get; set; } + + /// + /// The date for the cash discount + ///
Unless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("cashDiscountDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? CashDiscountDate { get; set; } + + /// + /// The post period for the invoice + /// + [Newtonsoft.Json.JsonProperty("postPeriod", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PostPeriod { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderLineDto + { + /// + /// The line number of the sales order line + /// + [Newtonsoft.Json.JsonProperty("lineId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int LineId { get; set; } + + /// + /// Used to apply sort order to a set of lines + /// + [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? SortOrder { get; set; } + + /// + /// The type of sales order line + /// + [Newtonsoft.Json.JsonProperty("lineType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string LineType { get; set; } + + /// + /// The type of operation the line represents to the order + /// + [Newtonsoft.Json.JsonProperty("operation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Operation { get; set; } + + /// + /// The date the order line was added + ///
Unless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("orderDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? OrderDate { get; set; } + + [Newtonsoft.Json.JsonProperty("inventory", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SalesOrderLineInventoryDto Inventory { get; set; } + + /// + /// The unit of measure (UOM) for the sales order line + /// + [Newtonsoft.Json.JsonProperty("unitOfMeasure", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UnitOfMeasure { get; set; } + + /// + /// The quantity of unit of measure this line represents + /// + [Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Quantity { get; set; } + + /// + /// The base order quantity for this line + /// + [Newtonsoft.Json.JsonProperty("baseOrderQuantity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? BaseOrderQuantity { get; set; } + + /// + /// The unit cost of items on this order line + /// + [Newtonsoft.Json.JsonProperty("unitCost", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? UnitCost { get; set; } + + /// + /// The unit price for items on this order line + /// + [Newtonsoft.Json.JsonProperty("unitPrice", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? UnitPrice { get; set; } + + /// + /// Any description for this order line + /// + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + /// + /// The shipping rule code for this order line + /// + [Newtonsoft.Json.JsonProperty("shippingRule", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ShippingRule { get; set; } + + /// + /// Whether this order line is completed or not + /// + [Newtonsoft.Json.JsonProperty("completed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? Completed { get; set; } + + /// + /// The extended price for this sales order line + /// + [Newtonsoft.Json.JsonProperty("extendedPrice", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? ExtendedPrice { get; set; } + + /// + /// The line total before any discounts are applied + /// + [Newtonsoft.Json.JsonProperty("lineTotalBeforeDiscount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? LineTotalBeforeDiscount { get; set; } + + /// + /// The discount amount for this line + /// + [Newtonsoft.Json.JsonProperty("discountAmount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? DiscountAmount { get; set; } + + /// + /// Any external link for this sales order line + /// + [Newtonsoft.Json.JsonProperty("externalLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ExternalLink { get; set; } + + /// + /// The Tax Category Id applying to this order line + /// + [Newtonsoft.Json.JsonProperty("taxCategoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string TaxCategoryId { get; set; } + + /// + /// The reason code + /// + [Newtonsoft.Json.JsonProperty("reasonCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ReasonCode { get; set; } + + /// + /// The Site Id for items on this line + /// + [Newtonsoft.Json.JsonProperty("warehouseId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string WarehouseId { get; set; } + + /// + /// The undership threshold value (%) + /// + [Newtonsoft.Json.JsonProperty("undershipThreshold", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? UndershipThreshold { get; set; } + + /// + /// The overship threshold value (%) + /// + [Newtonsoft.Json.JsonProperty("overshipThreshold", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? OvershipThreshold { get; set; } + + /// + /// The expected shipping date for this order line + ///
Unless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("shipDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ShipDate { get; set; } + + /// + /// The request date for this order line + ///
Unless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("requestDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? RequestDate { get; set; } + + /// + /// Any note that has been applied to this order line + /// + [Newtonsoft.Json.JsonProperty("note", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Note { get; set; } + + /// + /// The general ledger account this line applies to + /// + [Newtonsoft.Json.JsonProperty("salesAccountId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string SalesAccountId { get; set; } + + /// + /// The general ledger subaccount this line applies to + /// + [Newtonsoft.Json.JsonProperty("subaccount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary Subaccount { get; set; } + + /// + /// The open quantity for this line + /// + [Newtonsoft.Json.JsonProperty("openQuantity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? OpenQuantity { get; set; } + + /// + /// The billed quantity for this line + /// + [Newtonsoft.Json.JsonProperty("billedQuantity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? BilledQuantity { get; set; } + + /// + /// The quantity on shipments for this line + /// + [Newtonsoft.Json.JsonProperty("quantityOnShipments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? QuantityOnShipments { get; set; } + + /// + /// Discount percentage applied to this line + /// + [Newtonsoft.Json.JsonProperty("discountPercent", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? DiscountPercent { get; set; } + + /// + /// Code of discount applied to this line + /// + [Newtonsoft.Json.JsonProperty("discountCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string DiscountCode { get; set; } + + /// + /// Discount is applied manually + /// + [Newtonsoft.Json.JsonProperty("hasManualDiscount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool HasManualDiscount { get; set; } + + /// + /// Whether these item(s) are free or not + /// + [Newtonsoft.Json.JsonProperty("freeItem", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool FreeItem { get; set; } + + [Newtonsoft.Json.JsonProperty("warehouseLocation", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public LocationDto WarehouseLocation { get; set; } + + /// + /// The replacement unit cost of an item. This is set based on the supplier price. + ///
If no supplier price found, the last price of the item's default supplier will be used. + ///
If no default supplier is set, the last cost of the item will be used. + ///
+ [Newtonsoft.Json.JsonProperty("replacementUnitCost", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? ReplacementUnitCost { get; set; } + + /// + /// Unit price is applied manually + /// + [Newtonsoft.Json.JsonProperty("hasManualPrice", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool HasManualPrice { get; set; } + + [Newtonsoft.Json.JsonProperty("inventoryAlternateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string InventoryAlternateId { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderLineDtoPagedResult + { + /// + /// Gets or sets the items that are paged + /// + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Value { get; set; } + + /// + /// Gets or sets the link to the next page with more results. If set to null then no more records are present. + /// + [Newtonsoft.Json.JsonProperty("nextPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string NextPage { get; set; } + + /// + /// Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined + /// + [Newtonsoft.Json.JsonProperty("totalCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? TotalCount { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderLineInventoryDto + { + /// + /// The id + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// The description + /// + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + [Newtonsoft.Json.JsonProperty("baseUnit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string BaseUnit { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderListDto + { + /// + /// Links applicable for the dto + /// + [Newtonsoft.Json.JsonProperty("_links", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary _links { get; set; } + + /// + /// The type of the order + /// + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + /// + /// The order id (a.k.a OrderCd) for the order + /// + [Newtonsoft.Json.JsonProperty("orderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string OrderId { get; set; } + + /// + /// The current status of the order + /// + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Status { get; set; } + + /// + /// The order date + ///
Unless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("date", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Date { get; set; } + + /// + /// The date shipment is scheduled + ///
Unless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("shippingScheduledDate", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset ShippingScheduledDate { get; set; } + + /// + /// The customer Id for the order (a.k.a CustoemrCd) + /// + [Newtonsoft.Json.JsonProperty("customerId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CustomerId { get; set; } + + /// + /// The name of the customer as it appears on the order + /// + [Newtonsoft.Json.JsonProperty("customerName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CustomerName { get; set; } + + /// + /// The total number of items on the order + /// + [Newtonsoft.Json.JsonProperty("orderQty", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double OrderQty { get; set; } + + /// + /// The total amount on the order + /// + [Newtonsoft.Json.JsonProperty("orderTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double OrderTotal { get; set; } + + /// + /// The currency id for the order + /// + [Newtonsoft.Json.JsonProperty("currency", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Currency { get; set; } + + /// + /// The customer location for this order + /// + [Newtonsoft.Json.JsonProperty("location", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Location { get; set; } + + /// + /// The date the order is requested + ///
Unless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("requestOn", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset RequestOn { get; set; } + + /// + /// The customer order link + /// + [Newtonsoft.Json.JsonProperty("customerOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CustomerOrder { get; set; } + + /// + /// The order reference number of the customer + /// + [Newtonsoft.Json.JsonProperty("customerRefNo", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CustomerRefNo { get; set; } + + /// + /// Any description on the order + /// + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + /// + /// The date and time the order was last modified + /// + [Newtonsoft.Json.JsonProperty("lastModified", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset LastModified { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderListDtoPagedResult + { + /// + /// Gets or sets the items that are paged + /// + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Value { get; set; } + + /// + /// Gets or sets the link to the next page with more results. If set to null then no more records are present. + /// + [Newtonsoft.Json.JsonProperty("nextPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string NextPage { get; set; } + + /// + /// Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined + /// + [Newtonsoft.Json.JsonProperty("totalCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? TotalCount { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderOriginDto + { + /// + /// Links applicable for the dto + /// + [Newtonsoft.Json.JsonProperty("_links", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary _links { get; set; } + + /// + /// The order type code for the origin order + /// + [Newtonsoft.Json.JsonProperty("orderType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string OrderType { get; set; } + + /// + /// The unique id of the origin order + /// + [Newtonsoft.Json.JsonProperty("orderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string OrderId { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderPaymentDto + { + [Newtonsoft.Json.JsonProperty("paymentMethod", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CdDescriptionPairDto PaymentMethod { get; set; } + + /// + /// The cash account to use + /// + [Newtonsoft.Json.JsonProperty("cashAccountId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CashAccountId { get; set; } + + /// + /// The payment reference + /// + [Newtonsoft.Json.JsonProperty("paymentReference", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PaymentReference { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderPrintDto + { + /// + /// Set to true to print description on the invoice + /// + [Newtonsoft.Json.JsonProperty("descriptionOnInvoice", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? DescriptionOnInvoice { get; set; } + + /// + /// Set to true to print note on internal documents + /// + [Newtonsoft.Json.JsonProperty("noteOnInternalDocuments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? NoteOnInternalDocuments { get; set; } + + /// + /// Set to true to print note on external documents + /// + [Newtonsoft.Json.JsonProperty("noteOnExternalDocuments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? NoteOnExternalDocuments { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderRotRutDistributionDto + { + /// + /// Reference to the order line + /// + [Newtonsoft.Json.JsonProperty("lineId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int LineId { get; set; } + + /// + /// The personal id + /// + [Newtonsoft.Json.JsonProperty("personalId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PersonalId { get; set; } + + /// + /// The amount + /// + [Newtonsoft.Json.JsonProperty("amount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Amount { get; set; } + + /// + /// Whether this is extra or not + /// + [Newtonsoft.Json.JsonProperty("extra", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? Extra { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderRotRutDto + { + /// + /// Whether the ROT/RUT is distributed automatically + /// + [Newtonsoft.Json.JsonProperty("distributedAutomatically", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool DistributedAutomatically { get; set; } + + /// + /// The type of ROT/RUT + /// + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + /// + /// The appartment reference + /// + [Newtonsoft.Json.JsonProperty("appartment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Appartment { get; set; } + + /// + /// The estate reference + /// + [Newtonsoft.Json.JsonProperty("estate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Estate { get; set; } + + /// + /// The organization number + /// + [Newtonsoft.Json.JsonProperty("organizationNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string OrganizationNumber { get; set; } + + /// + /// The distrinbution entries + /// + [Newtonsoft.Json.JsonProperty("distribution", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Distribution { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderShippingDto + { + [Newtonsoft.Json.JsonProperty("contact", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ContactDto Contact { get; set; } + + [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public AddressDto Address { get; set; } + + /// + /// The shipping scheduled date + ///
Unless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("scheduledDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ScheduledDate { get; set; } + + /// + /// Whether this order can/is shipped separately + /// + [Newtonsoft.Json.JsonProperty("shipSeparately", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool ShipSeparately { get; set; } + + /// + /// The shipping rule + /// + [Newtonsoft.Json.JsonProperty("rule", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Rule { get; set; } + + [Newtonsoft.Json.JsonProperty("preferredWarehouse", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CdDescriptionPairDto PreferredWarehouse { get; set; } + + [Newtonsoft.Json.JsonProperty("shipVia", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CdDescriptionPairDto ShipVia { get; set; } + + [Newtonsoft.Json.JsonProperty("fobPoint", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CdDescriptionPairDto FobPoint { get; set; } + + [Newtonsoft.Json.JsonProperty("terms", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CdDescriptionPairDto Terms { get; set; } + + [Newtonsoft.Json.JsonProperty("zone", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CdDescriptionPairDto Zone { get; set; } + + /// + /// Whether this is residential delivery + /// + [Newtonsoft.Json.JsonProperty("residentialDelivery", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool ResidentialDelivery { get; set; } + + /// + /// Whether this is a saturday delivery + /// + [Newtonsoft.Json.JsonProperty("saturdayDelivery", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool SaturdayDelivery { get; set; } + + /// + /// Whether insurance applies to this shipping + /// + [Newtonsoft.Json.JsonProperty("insurance", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Insurance { get; set; } + + [Newtonsoft.Json.JsonProperty("intrastatTransactionType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IdDescriptionPairDto IntrastatTransactionType { get; set; } + + /// + /// Priority of the order + /// + [Newtonsoft.Json.JsonProperty("priority", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Priority { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderStatusDto + { + /// + /// The status code for the order + /// + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + /// + /// Whether this order is in a cancelled state + /// + [Newtonsoft.Json.JsonProperty("cancelled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Cancelled { get; set; } + + /// + /// Whether this order is in a held state + /// + [Newtonsoft.Json.JsonProperty("hold", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Hold { get; set; } + + } + + /// + /// The Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderTaxDto specifies a tax line detail for a sales order + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderTaxDto + { + /// + /// The unique tax identifier of the specific tax applied to the document + /// + [Newtonsoft.Json.JsonProperty("taxId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string TaxId { get; set; } + + /// + /// The tax rate used for the tax + /// + [Newtonsoft.Json.JsonProperty("taxRate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? TaxRate { get; set; } + + /// + /// The calculated taxable amount for the specific tax + /// + [Newtonsoft.Json.JsonProperty("taxableAmount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? TaxableAmount { get; set; } + + /// + /// The calculated tax amount for the specific tax + /// + [Newtonsoft.Json.JsonProperty("taxAmount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? TaxAmount { get; set; } + + /// + /// Indicates if the taxable amount will be included in taxExemptTotal + /// + [Newtonsoft.Json.JsonProperty("exemptTax", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool ExemptTax { get; set; } + + /// + /// Indicates if the taxable amount will be included in taxableTotal + /// + [Newtonsoft.Json.JsonProperty("includeInTaxable", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IncludeInTaxable { get; set; } + + /// + /// Indicates if the tax calculated is treated as a pending tax + /// + [Newtonsoft.Json.JsonProperty("isPendingTax", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsPendingTax { get; set; } + + /// + /// Indicates if the tax calculated is treated as a statistical tax + /// + [Newtonsoft.Json.JsonProperty("isStatisticalTax", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsStatisticalTax { get; set; } + + /// + /// Indicates if the tax is treated as a reverse tax + /// + [Newtonsoft.Json.JsonProperty("isReverseTax", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsReverseTax { get; set; } + + /// + /// The type of tax, which can be Sales, Use, VAT or Withholding + /// + [Newtonsoft.Json.JsonProperty("taxType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string TaxType { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderTotalsDto + { + /// + /// The order total + /// + [Newtonsoft.Json.JsonProperty("orderTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double OrderTotal { get; set; } + + /// + /// The order total in base currency + /// + [Newtonsoft.Json.JsonProperty("orderTotalInBaseCurrency", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double OrderTotalInBaseCurrency { get; set; } + + /// + /// The VAT taxable total + /// + [Newtonsoft.Json.JsonProperty("taxableTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double TaxableTotal { get; set; } + + /// + /// The VAT taxable in base currency + /// + [Newtonsoft.Json.JsonProperty("taxableTotalInBaseCurrency", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double TaxableTotalInBaseCurrency { get; set; } + + /// + /// The VAT exempt total + /// + [Newtonsoft.Json.JsonProperty("taxExemptTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double TaxExemptTotal { get; set; } + + /// + /// The VAT exempt total in base currency + /// + [Newtonsoft.Json.JsonProperty("taxExemptTotalInBaseCurrency", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double TaxExemptTotalInBaseCurrency { get; set; } + + /// + /// The tax total + /// + [Newtonsoft.Json.JsonProperty("taxTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double TaxTotal { get; set; } + + /// + /// The tax total in base currency + /// + [Newtonsoft.Json.JsonProperty("taxTotalInBaseCurrency", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double TaxTotalInBaseCurrency { get; set; } + + /// + /// The discount total + /// + [Newtonsoft.Json.JsonProperty("discountTotal", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? DiscountTotal { get; set; } + + /// + /// The discount total in base currency + /// + [Newtonsoft.Json.JsonProperty("discountTotalInBaseCurrency", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? DiscountTotalInBaseCurrency { get; set; } + + /// + /// The total of the costs on the lines of the sales order. How the `costTotal` is calculated is dependent on the option `useReplacementCostForMarginAndProfit`. + ///
If this option is `true` the `costTotal` will be calculated based on the `replacementUnitCost`. + ///
If this option is `false`, the `costTotal` will be calculate based on `unitCost` + ///
+ [Newtonsoft.Json.JsonProperty("costTotal", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? CostTotal { get; set; } + + /// + /// The total of the costs on the lines of the sales order in base currency. + /// + [Newtonsoft.Json.JsonProperty("costTotalInBaseCurrency", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? CostTotalInBaseCurrency { get; set; } + + /// + /// The freight cost calculated for the sales order. Not applicable for transfer order types. + /// + [Newtonsoft.Json.JsonProperty("freightCost", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? FreightCost { get; set; } + + /// + /// The freight amount calculated in accordance with the shipping terms. Not applicable for transfer order types. + /// + [Newtonsoft.Json.JsonProperty("freightTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double FreightTotal { get; set; } + + } + + /// + /// Defines an error response for validation problems + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderValidationProblemDetails + { + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + [Newtonsoft.Json.JsonProperty("title", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Title { get; set; } + + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Status { get; set; } + + [Newtonsoft.Json.JsonProperty("detail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Detail { get; set; } + + [Newtonsoft.Json.JsonProperty("instance", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Instance { get; set; } + + [Newtonsoft.Json.JsonProperty("errors", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary> Errors { get; set; } + + /// + /// List with details for all the validation problems + /// + [Newtonsoft.Json.JsonProperty("details", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Details { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties; } + set { _additionalProperties = value; } + } + + } + + /// + /// Defines details related to validation problems + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class ValidationErrorCodeDetails + { + /// + /// Error code + /// + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + /// + /// Detailed validation message + /// + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + /// + /// Extra parameters related to the validation problem. + ///
<remarks>If the validation problem refers to a particular field the "property" element will contain the field name</remarks> + ///
+ [Newtonsoft.Json.JsonProperty("parameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary Parameters { get; set; } + + } + + /// + /// Warehouse information for a specific inventory item + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class WarehouseAvailabilityDto + { + /// + /// The internal id used by the system for the warehouse + /// + [Newtonsoft.Json.JsonProperty("internalWarehouseId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int InternalWarehouseId { get; set; } + + /// + /// The id (SiteCd) of the warehouse + /// + [Newtonsoft.Json.JsonProperty("warehouseId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string WarehouseId { get; set; } + + /// + /// The description of the warehouse + /// + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + /// + /// Physical quantity on-hand of items in the specific warehouse + /// + [Newtonsoft.Json.JsonProperty("quantityOnHand", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double QuantityOnHand { get; set; } + + /// + /// You can configure the way this estimated quantity is calculated by using availability + ///
calculation rules. The available quantity may include anticipated transactions and therefore + ///
may be less than or greater than the QuantityOnHand. Anticipated transactions correspond + ///
to the documents and transactions that have been entered in the system but not yet + ///
processed to the end. + ///
In the availability calculation settings of an item class, you specify which anticipated + ///
transactions affect the available quantity. Thus, the available quantity may include + ///
goods on purchase orders and exclude the goods allocated for sales orders. You can use + ///
the available quantity as an indicator of demand + ///
+ [Newtonsoft.Json.JsonProperty("quantityAvailable", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double QuantityAvailable { get; set; } + + /// + /// Estimated quantity calculated by using the following formula: the QuantityOnHand minus the quantity on unreleased inventory + ///
issues, minus the quantity allocated for shipping. Thus, the QuantityAvailableForShipment can be less than the QuantityOnHand + ///
+ [Newtonsoft.Json.JsonProperty("quantityAvailableForShipment", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double QuantityAvailableForShipment { get; set; } + + /// + /// The quantity stored at locations not included in the availability calculation. + ///
For each warehouse location, the 'Include in Qty. Available' check box on the + ///
Warehouses(IN204000) screen defines whether the quantity of items stored at this + ///
location is included in the quantity of available items. + ///
+ [Newtonsoft.Json.JsonProperty("quantityNotAvailable", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double QuantityNotAvailable { get; set; } + + /// + /// The quantity of the inventory item included in open purchase orders. + /// + [Newtonsoft.Json.JsonProperty("quantityPurchaseOrders", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double QuantityPurchaseOrders { get; set; } + + /// + /// The estimated cost per unit, calculated as EstimatedTotalCost/QuantityOnHand + /// + [Newtonsoft.Json.JsonProperty("estimatedUnitCost", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? EstimatedUnitCost { get; set; } + + /// + /// The total cost for the QuantityOnHand + /// + [Newtonsoft.Json.JsonProperty("estimatedTotalCost", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? EstimatedTotalCost { get; set; } + + /// + /// The date and time the entry for this warehouse was modified + ///
Unless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone. + ///
+ [Newtonsoft.Json.JsonProperty("lastModified", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset LastModified { get; set; } + + /// + /// List of locations in the warehouse for the specific inventory item. + ///
Note that this is not returned as part of the response unless expand=Location is specified with the request. + ///
+ [Newtonsoft.Json.JsonProperty("locations", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Locations { get; set; } + + } + + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SwaggerResponse + { + public int StatusCode { get; private set; } + + public System.Collections.Generic.IReadOnlyDictionary> Headers { get; private set; } + + public SwaggerResponse(int statusCode, System.Collections.Generic.IReadOnlyDictionary> headers) + { + StatusCode = statusCode; + Headers = headers; + } + } + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SwaggerResponse : SwaggerResponse + { + public TResult Result { get; private set; } + + public SwaggerResponse(int statusCode, System.Collections.Generic.IReadOnlyDictionary> headers, TResult result) + : base(statusCode, headers) + { + Result = result; + } + } + + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class ApiException : System.Exception + { + public int StatusCode { get; private set; } + + public string Response { get; private set; } + + public System.Collections.Generic.IReadOnlyDictionary> Headers { get; private set; } + + public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Exception innerException) + : base(message + "\n\nStatus: " + statusCode + "\nResponse: \n" + ((response == null) ? "(null)" : response.Substring(0, response.Length >= 512 ? 512 : response.Length)), innerException) + { + StatusCode = statusCode; + Response = response; + Headers = headers; + } + + public override string ToString() + { + return string.Format("HTTP Response: \n\n{0}\n\n{1}", Response, base.ToString()); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class ApiException : ApiException + { + public TResult Result { get; private set; } + + public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary> headers, TResult result, System.Exception innerException) + : base(message, statusCode, response, headers, innerException) + { + Result = result; + } + } + +} + +#pragma warning restore 1591 +#pragma warning restore 1573 +#pragma warning restore 472 +#pragma warning restore 114 +#pragma warning restore 108 +#pragma warning restore 3016 +#pragma warning restore 8603 \ No newline at end of file diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index a010ce5..5000e9f 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -4,7 +4,7 @@ Visma.net Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 - 4.1.0.2 + 4.2.1.0 netstandard2.0;net462;net6 Visma.net Copyright © ON IT AS 2014 - 2022 @@ -35,6 +35,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + @@ -51,4 +52,9 @@ + + + 12.0.1 + + \ No newline at end of file diff --git a/Visma.net/VismaNet.cs b/Visma.net/VismaNet.cs index 4a39152..d6222a3 100644 --- a/Visma.net/VismaNet.cs +++ b/Visma.net/VismaNet.cs @@ -59,8 +59,10 @@ public class VismaNet : VismaNetDynamicHandler public readonly PurchaseReceiptData PurchaseReceipt; public readonly PurchaseOrderData PurchaseOrder; + public readonly SalesOrderV3.ClientSalesOrderV3 SalesOrderV3; + // Obsolete - [Obsolete("SALES ORDER WILL STOP WORKING 2023-06-01! Replaced by https://salesorder.visma.net.")] + [Obsolete("SALES ORDER WILL STOP WORKING 2023-06-01! Replaced by https://salesorder.visma.net. use SalesOrderV3.")] public readonly SalesOrderData SalesOrder; [Obsolete("Deprecated. Start using the new method in endpoint Customer Credit Note.", true)] @@ -76,9 +78,9 @@ public class VismaNet : VismaNetDynamicHandler /// The predefined token from Visma.net /// Branch ID to work with in the Visma.net Company (optional) /// Bring your own HttpClient - public VismaNet(int companyId, string token, int branchId = 0, HttpClient httpClient = null) + public VismaNet(int companyId, string token, int branchId = 0, HttpClient httpClient = null, string VismaConnectClientId = null, string VismaConnectClientSecret = null, string VismaConnectTenantId = null,string VismaConnectScopes = "vismanet_erp_service_api:create vismanet_erp_service_api:delete vismanet_erp_service_api:read vismanet_erp_service_api:update") { - if (string.IsNullOrEmpty(token)) + if (string.IsNullOrEmpty(token) && VismaConnectClientId == null) throw new InvalidArgumentsException("Token is missing"); Auth = new VismaNetAuthorization @@ -86,7 +88,11 @@ public VismaNet(int companyId, string token, int branchId = 0, HttpClient httpCl Token = token, CompanyId = companyId, BranchId = branchId, - HttpClient = httpClient + HttpClient = httpClient, + VismaConnectClientId = VismaConnectClientId, + VismaConnectClientSecret = VismaConnectClientSecret, + VismaConnectTenantId = VismaConnectTenantId, + VismaConnectScopes = VismaConnectScopes }; Attribute = new AttributeData(Auth); Customer = new CustomerData(Auth); @@ -128,6 +134,7 @@ public VismaNet(int companyId, string token, int branchId = 0, HttpClient httpCl PurchaseOrder = new PurchaseOrderData(Auth); CashTransaction = new CashTransactionData(Auth); Background = new BackgroundData(Auth); + SalesOrderV3 = new SalesOrderV3.ClientSalesOrderV3(Auth); } /// @@ -210,7 +217,7 @@ public static async Task GetTokenUsingOAuth(string client_id, string cli { return await VismaNetApiHelper.GetTokenOAuth(client_id, client_secret, code, redirect_uri); } - public static async Task GetTokenFromVismaConnect(string clientId, string secret, string tenant_id, string scope = "vismanet_erp_service_api:create vismanet_erp_service_api:delete vismanet_erp_service_api:read vismanet_erp_service_api:update") + public static async Task GetTokenFromVismaConnect(string clientId, string secret, string tenant_id, string scope = "vismanet_erp_service_api:create vismanet_erp_service_api:delete vismanet_erp_service_api:read vismanet_erp_service_api:update") { return await VismaNetApiHelper.GetTokenFromVismaConnect(clientId,secret,tenant_id,scope); } diff --git a/Visma.net/lib/Data/SalesOrderData.cs b/Visma.net/lib/Data/SalesOrderData.cs index 2e48819..8281336 100644 --- a/Visma.net/lib/Data/SalesOrderData.cs +++ b/Visma.net/lib/Data/SalesOrderData.cs @@ -4,7 +4,7 @@ namespace ONIT.VismaNetApi.Lib.Data { - [Obsolete("WILL STOP WORKING 01-06-2023! Replaced by https://salesorder.visma.net.")] + [Obsolete("WILL STOP WORKING 01-06-2023! Replaced by https://salesorder.visma.net. use SalesOrderV3")] public class SalesOrderData : BasePaginatedCrudDataClass { public SalesOrderData(VismaNetAuthorization auth) : base(auth) diff --git a/Visma.net/lib/VismaConnectToken.cs b/Visma.net/lib/VismaConnectToken.cs new file mode 100644 index 0000000..5e82858 --- /dev/null +++ b/Visma.net/lib/VismaConnectToken.cs @@ -0,0 +1,10 @@ +using System; + +namespace ONIT.VismaNetApi.Lib +{ + public class VismaConnectToken + { + public string access_token { get; set; } + public DateTimeOffset expires_on { get; set; } + } +} \ No newline at end of file diff --git a/Visma.net/lib/VismaNetApiHelper.cs b/Visma.net/lib/VismaNetApiHelper.cs index 4df637b..b41b147 100644 --- a/Visma.net/lib/VismaNetApiHelper.cs +++ b/Visma.net/lib/VismaNetApiHelper.cs @@ -579,21 +579,29 @@ internal static async Task GetTokenOAuth(string clientId, string secret, return data["token"].Value(); } } - internal static async Task GetTokenFromVismaConnect(string clientId, string secret, string tenant_id, string scope = "vismanet_erp_service_api:create vismanet_erp_service_api:delete vismanet_erp_service_api:read vismanet_erp_service_api:update") + internal static async Task GetTokenFromVismaConnect(string clientId, string secret, string tenant_id, string scope = "vismanet_erp_service_api:create vismanet_erp_service_api:delete vismanet_erp_service_api:read vismanet_erp_service_api:update") { - var webclient = GetHttpClient(new VismaNetAuthorization()); + try { - var url = VismaNetControllers.VismaConnectToken; - var content = new FormUrlEncodedContent(new[] + var webclient = GetHttpClient(new VismaNetAuthorization()); { + var url = VismaNetControllers.VismaConnectToken; + var content = new FormUrlEncodedContent(new[] + { new KeyValuePair("client_id", clientId), new KeyValuePair("client_secret", secret), new KeyValuePair("tenant_id", tenant_id), new KeyValuePair("scope", scope), new KeyValuePair("grant_type", "client_credentials") }); - var data = await webclient.PostMessage(url, content); - return data["access_token"].Value(); + var data = await webclient.PostMessageVismaConnect(url, content); + + + return new VismaConnectToken { access_token = data["access_token"].Value(), expires_on = DateTimeOffset.UtcNow.AddSeconds(data["expires_in"].Value()) }; + } + } catch (Exception ex) + { + throw ex; } } diff --git a/Visma.net/lib/VismaNetControllers.cs b/Visma.net/lib/VismaNetControllers.cs index 2ac24ea..4c1c348 100644 --- a/Visma.net/lib/VismaNetControllers.cs +++ b/Visma.net/lib/VismaNetControllers.cs @@ -58,5 +58,8 @@ internal static class VismaNetControllers // Resources public const string OAuthAuthorize = "resources/oauth/authorize"; public const string UserContext = "resources/v1/context"; + + // SalesOrderV3 + public const string SalesOrderV3BaseUrl = "https://salesorder.visma.net/"; } } diff --git a/Visma.net/lib/VismaNetWebClient.cs b/Visma.net/lib/VismaNetWebClient.cs index 5cbcac7..fa3f7a1 100644 --- a/Visma.net/lib/VismaNetWebClient.cs +++ b/Visma.net/lib/VismaNetWebClient.cs @@ -1,5 +1,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using ONIT.VismaNetApi.Exceptions; using ONIT.VismaNetApi.Models; using System; using System.Collections.Generic; @@ -97,10 +99,24 @@ internal HttpRequestMessage PrepareMessage(HttpMethod method, string resource) var message = new HttpRequestMessage(method, resource); if (_authorization != null) { - message.Headers.Authorization = new AuthenticationHeaderValue("Bearer", _authorization.Token); - message.Headers.Add("ipp-company-id", string.Format("{0}", _authorization.CompanyId)); - if (_authorization.BranchId > 0) - message.Headers.Add("branchid", _authorization.BranchId.ToString()); + if (_authorization.VismaConnectClientId != null) // new auth via Visma Connect + { + // Check for token expired ( 5 minutes grace ) + if (_authorization.VismaConnectToken == null || _authorization.VismaConnectTokenExpire.AddMinutes(-5) > DateTimeOffset.UtcNow) + { + var vToken = VismaNetApiHelper.GetTokenFromVismaConnect(_authorization.VismaConnectClientId, _authorization.VismaConnectClientSecret, _authorization.VismaConnectTenantId, _authorization.VismaConnectScopes).Result; + _authorization.VismaConnectToken = vToken.access_token; + _authorization.VismaConnectTokenExpire = vToken.expires_on; + } + message.Headers.Authorization = new AuthenticationHeaderValue("Bearer", _authorization.VismaConnectToken); + } + else + { + message.Headers.Authorization = new AuthenticationHeaderValue("Bearer", _authorization.Token); + message.Headers.Add("ipp-company-id", string.Format("{0}", _authorization.CompanyId)); + if (_authorization.BranchId > 0) + message.Headers.Add("branchid", _authorization.BranchId.ToString()); + } } message.Headers.Add("ipp-application-type", VismaNetApiHelper.ApplicationType); message.Headers.ExpectContinue = false; @@ -181,6 +197,34 @@ internal async Task PostMessage(string url, HttpContent httpContent) where return default(T); } + internal async Task PostMessageVismaConnect(string url, HttpContent httpContent) + { + var message = PrepareMessage(HttpMethod.Post, url); + message.Content = httpContent; + var result = await HttpClient.SendAsync(message); + string content = await result.Content.ReadAsStringAsync(); + JObject jsonObj = null; + if (!string.IsNullOrEmpty(content)) + jsonObj = JsonConvert.DeserializeObject(content); + + if (!result.IsSuccessStatusCode) + { + if (!string.IsNullOrEmpty(content)) + { + throw new VismaConnectException($"Error: {jsonObj["error"].Value()}, statuscode: {(int)result.StatusCode} {result.ReasonPhrase}", content); + } + else + { + throw new VismaConnectException($"Unknown error, statuscode: {(int)result.StatusCode} {result.ReasonPhrase}"); + } + + } + else + { + return jsonObj; + } + } + internal async Task Post(string url, object data, string urlToGet = null, bool ignoreAbsoluteUri = false, string erpApiBackground = null) { using (var message = PrepareMessage(HttpMethod.Post, url)) From a2d7f677fd9edbfe06ba9ea0a8bfb114da5eaf2f Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Mon, 21 Aug 2023 08:57:59 +0200 Subject: [PATCH 18/37] Added aktive to Subaccount --- Visma.net/Models/Subaccount.cs | 6 ++++++ Visma.net/Visma.net.csproj | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Visma.net/Models/Subaccount.cs b/Visma.net/Models/Subaccount.cs index b838aa4..5b64125 100644 --- a/Visma.net/Models/Subaccount.cs +++ b/Visma.net/Models/Subaccount.cs @@ -73,6 +73,12 @@ public int subaccountId set => Set(value); } + public bool active + { + get => Get(); + set => Set(value); + } + public string GetIdentificator() { return subaccountId.ToString(); diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index 5000e9f..6bf46fb 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -4,7 +4,7 @@ Visma.net Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 - 4.2.1.0 + 4.2.1.1 netstandard2.0;net462;net6 Visma.net Copyright © ON IT AS 2014 - 2022 @@ -25,8 +25,8 @@ LICENSE.md on_it_logo.png README.md - 4.0.3.11 - 4.0.3.11 + 4.0.3.12 + 4.0.3.12 From 0a9253b0ec459491e23d6c8f11e52197c5175490 Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Mon, 25 Sep 2023 11:13:48 +0200 Subject: [PATCH 19/37] Split of SalesOrderV3 to own project --- .../ClientSalesOrderV3.Extensions.cs | 56 +++-- .../ClientSalesOrderV3.cs | 4 +- .../Exceptions/VismaConnectException.cs | 20 ++ .../VismaNetExceptionClientIdMissing.cs | 2 +- .../Helpers/VismaConnectToken.cs | 10 + .../Helpers/VismaNetApiHelper.cs | 67 ++++++ .../Helpers/VismaNetAuthorization.cs | 21 ++ .../Lib/VismaNetControllers.cs | 14 ++ .../Lib/VismaNetWebClient.cs | 196 ++++++++++++++++++ .../Models/Contracts.cs | 2 +- .../Visma.Net.SalesOrderNG.csproj | 17 ++ .../Visma.net.SalesOrder.nswag | 0 Visma.net.sln | 6 + Visma.net/Dynamic/VismaNetDynamicHandler.cs | 1 + .../Extensions/SalesOrderExtensions.cs | 12 +- .../SalesOrderHelper.cs | 4 +- Visma.net/Visma.net.csproj | 3 + Visma.net/VismaNet.cs | 21 +- Visma.net/lib/VismaNetApiHelper.cs | 2 +- Visma.net/lib/VismaNetControllers.cs | 3 +- 20 files changed, 431 insertions(+), 30 deletions(-) rename {Visma.net/SalesOrderV3 => Visma.Net.SalesOrderNG}/ClientSalesOrderV3.Extensions.cs (82%) rename {Visma.net/SalesOrderV3 => Visma.Net.SalesOrderNG}/ClientSalesOrderV3.cs (99%) create mode 100644 Visma.Net.SalesOrderNG/Exceptions/VismaConnectException.cs rename {Visma.net/SalesOrderV3 => Visma.Net.SalesOrderNG}/Exceptions/VismaNetExceptionClientIdMissing.cs (88%) create mode 100644 Visma.Net.SalesOrderNG/Helpers/VismaConnectToken.cs create mode 100644 Visma.Net.SalesOrderNG/Helpers/VismaNetApiHelper.cs create mode 100644 Visma.Net.SalesOrderNG/Helpers/VismaNetAuthorization.cs create mode 100644 Visma.Net.SalesOrderNG/Lib/VismaNetControllers.cs create mode 100644 Visma.Net.SalesOrderNG/Lib/VismaNetWebClient.cs rename {Visma.net/SalesOrderV3 => Visma.Net.SalesOrderNG}/Models/Contracts.cs (99%) create mode 100644 Visma.Net.SalesOrderNG/Visma.Net.SalesOrderNG.csproj rename Visma.net.SalesOrder.nswag => Visma.Net.SalesOrderNG/Visma.net.SalesOrder.nswag (100%) rename Visma.net/{SalesOrderV3 => }/Extensions/SalesOrderExtensions.cs (97%) rename Visma.net/{SalesOrderV3/Helpers => Extensions}/SalesOrderHelper.cs (78%) diff --git a/Visma.net/SalesOrderV3/ClientSalesOrderV3.Extensions.cs b/Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs similarity index 82% rename from Visma.net/SalesOrderV3/ClientSalesOrderV3.Extensions.cs rename to Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs index 66bced1..37a8149 100644 --- a/Visma.net/SalesOrderV3/ClientSalesOrderV3.Extensions.cs +++ b/Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs @@ -1,8 +1,5 @@ -using ONIT.VismaNetApi.Exceptions; -using ONIT.VismaNetApi.Lib; -using ONIT.VismaNetApi.Models; -using ONIT.VismaNetApi.SalesOrderV3.Exceptions; -using ONIT.VismaNetApi.SalesOrderV3.Models; +using Visma.Net.SalesOrderNG.Exceptions; +using Visma.Net.SalesOrderNG.Models; using System; using System.CodeDom.Compiler; using System.Collections; @@ -13,16 +10,51 @@ using System.Net.Http.Headers; using System.Threading; using System.Threading.Tasks; +using Visma.Net.SalesOrderNG.Lib; +using System.Reflection; -namespace ONIT.VismaNetApi.SalesOrderV3 +namespace Visma.Net.SalesOrderNG { public partial class ClientSalesOrderV3 { - VismaNetAuthorization _authorization; + Helpers.VismaNetAuthorization _authorization; - public ClientSalesOrderV3(VismaNetAuthorization auth) : this() + public static string Version { get; private set; } + /// + /// Provide a name for your application. This will make it easier for Visma to identify your integration in their logs. + /// + public static string _ApplicationName { get; set; } + + private static int maxConcurrentRequests; + /// + /// Gets or sets the maximum number of concurrent requests sent to the API. Min: 1, Max: 8. + /// + public static int MaxConcurrentRequests + { + get + { + var requestLimit = maxConcurrentRequests > 0 ? maxConcurrentRequests : 8; + return requestLimit > 8 ? 8 : requestLimit; + } + + set => maxConcurrentRequests = value > 0 ? value : maxConcurrentRequests; + } + + private static int maxRetries; + /// + /// Gets or sets the maximum number of retries sent to the API. Min: 1, Max: 5, Default: 5. + /// + public static int MaxRetries + { + get { return maxRetries > 0 ? maxRetries : 5; } + set => maxRetries = (value > 0 && value < 6) ? value : 5; + } + + public ClientSalesOrderV3(Helpers.VismaNetAuthorization auth, string ApplicationName) : this() { _authorization = auth; + _ApplicationName = ApplicationName; + Version = Assembly.GetExecutingAssembly().GetName().Version.ToString(); } @@ -70,7 +102,7 @@ public async Task> getAllCustomer(string filter = null) var totalCount = (int)firstPage.Result.TotalCount; var pageSize = count; var pageCount = totalCount / pageSize; - var semaphore = new SemaphoreSlim(VismaNet.MaxConcurrentRequests); + var semaphore = new SemaphoreSlim(ClientSalesOrderV3.MaxConcurrentRequests); var taskList = new List>>(); foreach (var page in Enumerable.Range(1, pageCount)) { @@ -108,7 +140,7 @@ public async Task> getAllSalesOrder(string custom var totalCount = (int)firstPage.Result.TotalCount; var pageSize = count; var pageCount = totalCount / pageSize; - var semaphore = new SemaphoreSlim(VismaNet.MaxConcurrentRequests); + var semaphore = new SemaphoreSlim(ClientSalesOrderV3.MaxConcurrentRequests); var taskList = new List>>(); foreach (var page in Enumerable.Range(1, pageCount)) { @@ -146,7 +178,7 @@ public async Task> getAllSalesOrderOfType(string var totalCount = (int)firstPage.Result.TotalCount; var pageSize = count; var pageCount = totalCount / pageSize; - var semaphore = new SemaphoreSlim(VismaNet.MaxConcurrentRequests); + var semaphore = new SemaphoreSlim(ClientSalesOrderV3.MaxConcurrentRequests); var taskList = new List>>(); foreach (var page in Enumerable.Range(1, pageCount)) { @@ -184,7 +216,7 @@ public async Task> getAllSalesOrderLine(string ty var totalCount = (int)firstPage.Result.TotalCount; var pageSize = count; var pageCount = totalCount / pageSize; - var semaphore = new SemaphoreSlim(VismaNet.MaxConcurrentRequests); + var semaphore = new SemaphoreSlim(ClientSalesOrderV3.MaxConcurrentRequests); var taskList = new List>>(); foreach (var page in Enumerable.Range(1, pageCount)) { diff --git a/Visma.net/SalesOrderV3/ClientSalesOrderV3.cs b/Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs similarity index 99% rename from Visma.net/SalesOrderV3/ClientSalesOrderV3.cs rename to Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs index 9b68e84..8e1b7b0 100644 --- a/Visma.net/SalesOrderV3/ClientSalesOrderV3.cs +++ b/Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs @@ -4,7 +4,7 @@ // //---------------------- -using ONIT.VismaNetApi.SalesOrderV3.Models; +using Visma.Net.SalesOrderNG.Models; #pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." #pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." @@ -15,7 +15,7 @@ #pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" #pragma warning disable 8603 // Disable "CS8603 Possible null reference return" -namespace ONIT.VismaNetApi.SalesOrderV3 +namespace Visma.Net.SalesOrderNG { using System = global::System; diff --git a/Visma.Net.SalesOrderNG/Exceptions/VismaConnectException.cs b/Visma.Net.SalesOrderNG/Exceptions/VismaConnectException.cs new file mode 100644 index 0000000..305c1fb --- /dev/null +++ b/Visma.Net.SalesOrderNG/Exceptions/VismaConnectException.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Visma.Net.SalesOrderNG.Exceptions +{ + public class VismaConnectException : Exception + { + private string _jsonResult; + public string jsonResult { get { return _jsonResult; } } + public VismaConnectException() { } + public VismaConnectException(string message) : base(message) { } + public VismaConnectException(string message, Exception inner) : base(message, inner) { } + + public VismaConnectException(string message, string jsonResult) : base(message) + { + _jsonResult= jsonResult; + } + } +} diff --git a/Visma.net/SalesOrderV3/Exceptions/VismaNetExceptionClientIdMissing.cs b/Visma.Net.SalesOrderNG/Exceptions/VismaNetExceptionClientIdMissing.cs similarity index 88% rename from Visma.net/SalesOrderV3/Exceptions/VismaNetExceptionClientIdMissing.cs rename to Visma.Net.SalesOrderNG/Exceptions/VismaNetExceptionClientIdMissing.cs index a68af2f..01753c5 100644 --- a/Visma.net/SalesOrderV3/Exceptions/VismaNetExceptionClientIdMissing.cs +++ b/Visma.Net.SalesOrderNG/Exceptions/VismaNetExceptionClientIdMissing.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Text; -namespace ONIT.VismaNetApi.SalesOrderV3.Exceptions +namespace Visma.Net.SalesOrderNG.Exceptions { internal class VismaNetExceptionClientIdMissing : System.Exception { diff --git a/Visma.Net.SalesOrderNG/Helpers/VismaConnectToken.cs b/Visma.Net.SalesOrderNG/Helpers/VismaConnectToken.cs new file mode 100644 index 0000000..0dd7bac --- /dev/null +++ b/Visma.Net.SalesOrderNG/Helpers/VismaConnectToken.cs @@ -0,0 +1,10 @@ +using System; + +namespace Visma.Net.SalesOrderNG +{ + public class VismaConnectToken + { + public string access_token { get; set; } + public DateTimeOffset expires_on { get; set; } + } +} \ No newline at end of file diff --git a/Visma.Net.SalesOrderNG/Helpers/VismaNetApiHelper.cs b/Visma.Net.SalesOrderNG/Helpers/VismaNetApiHelper.cs new file mode 100644 index 0000000..be8ccc2 --- /dev/null +++ b/Visma.Net.SalesOrderNG/Helpers/VismaNetApiHelper.cs @@ -0,0 +1,67 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Threading; +using System.Threading.Tasks; + +namespace Visma.Net.SalesOrderNG +{ + public static class VismaNetApiHelper + { + private const int MaxReturnableEntitiesFromVismaNet = 1000; + internal const string ApplicationType = "Visma.net Financials"; + internal const string BaseApiUrl = "https://integration.visma.net/API/"; + + public const string VismaNetDateTimeFormat = "yyyy-MM-ddTHH:mm:ss.fff"; + + + + internal static string AppendToQuery(string query, string key, object value) + { + var divider = "?"; + if (query.IndexOf('?') > -1) + divider = "&"; + return $"{query}{divider}{key}={value}"; + } + + + public static async Task GetTokenFromVismaConnect(string clientId, string secret, string tenant_id, string scope = "vismanet_erp_service_api:create vismanet_erp_service_api:delete vismanet_erp_service_api:read vismanet_erp_service_api:update") + { + try + { + var webclient = GetHttpClient(new Helpers.VismaNetAuthorization()); + { + var url = Lib.VismaNetControllers.VismaConnectToken; + var content = new FormUrlEncodedContent(new[] + { + new KeyValuePair("client_id", clientId), + new KeyValuePair("client_secret", secret), + new KeyValuePair("tenant_id", tenant_id), + new KeyValuePair("scope", scope), + new KeyValuePair("grant_type", "client_credentials") + }); + var data = await webclient.PostMessageVismaConnect(url, content); + + + return new VismaConnectToken { access_token = data["access_token"].Value(), expires_on = DateTimeOffset.UtcNow.AddSeconds(data["expires_in"].Value()) }; + } + } catch (Exception ex) + { + throw ex; + } + } + + private static Lib.VismaNetHttpClient GetHttpClient(Helpers.VismaNetAuthorization auth = null) + { + return new Lib.VismaNetHttpClient(auth); + } + + } +} \ No newline at end of file diff --git a/Visma.Net.SalesOrderNG/Helpers/VismaNetAuthorization.cs b/Visma.Net.SalesOrderNG/Helpers/VismaNetAuthorization.cs new file mode 100644 index 0000000..efff174 --- /dev/null +++ b/Visma.Net.SalesOrderNG/Helpers/VismaNetAuthorization.cs @@ -0,0 +1,21 @@ +using System; +using System.Net.Http; + +namespace Visma.Net.SalesOrderNG.Helpers +{ + public class VismaNetAuthorization + { + public string Token { get; set; } + public int CompanyId { get; set; } + public bool UseProxy { get; set; } + public int BranchId { get; set; } + public HttpClient HttpClient { get; set; } + public string VismaConnectClientId { get; set; } = null; + public string VismaConnectClientSecret { get;set; } = null; + public string VismaConnectTenantId { get; set; } = null; + public string VismaConnectScopes { get; set ;} = "vismanet_erp_service_api:create vismanet_erp_service_api:delete vismanet_erp_service_api:read vismanet_erp_service_api:update"; + public string VismaConnectToken { get; set; } = null; + + public DateTimeOffset VismaConnectTokenExpire { get; set; } + } +} \ No newline at end of file diff --git a/Visma.Net.SalesOrderNG/Lib/VismaNetControllers.cs b/Visma.Net.SalesOrderNG/Lib/VismaNetControllers.cs new file mode 100644 index 0000000..7025886 --- /dev/null +++ b/Visma.Net.SalesOrderNG/Lib/VismaNetControllers.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Visma.Net.SalesOrderNG.Lib +{ + internal class VismaNetControllers + { + // Visma Connect + public const string VismaConnectToken = "https://connect.visma.com/connect/token"; + // SalesOrderV3 + public const string SalesOrderV3BaseUrl = "https://salesorder.visma.net/"; + } +} diff --git a/Visma.Net.SalesOrderNG/Lib/VismaNetWebClient.cs b/Visma.Net.SalesOrderNG/Lib/VismaNetWebClient.cs new file mode 100644 index 0000000..b32c92c --- /dev/null +++ b/Visma.Net.SalesOrderNG/Lib/VismaNetWebClient.cs @@ -0,0 +1,196 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Threading.Tasks; +using System.IO; +using Newtonsoft.Json.Converters; +using System.Threading; + + +namespace Visma.Net.SalesOrderNG.Lib +{ + public class RetryHandler : DelegatingHandler + { + // Strongly consider limiting the number of retries - "retry forever" is + // probably not the most user friendly way you could respond to "the + // network cable got pulled out." + private readonly int MaxRetries = ClientSalesOrderV3.MaxRetries; + + public RetryHandler(HttpMessageHandler innerHandler) + : base(innerHandler) + { } + + protected override async Task SendAsync( + HttpRequestMessage request, + CancellationToken cancellationToken) + { + HttpResponseMessage response = null; + for (int i = 0; i < MaxRetries; i++) + { + response = await base.SendAsync(request, cancellationToken); + if (response.IsSuccessStatusCode || response.StatusCode == System.Net.HttpStatusCode.NotFound) + { + return response; + } + System.Diagnostics.Debug.WriteLine($"[{i}/{MaxRetries}] {response.StatusCode} {response.ReasonPhrase}"); + // Will give an taskCanceledException if not disposed. + if (i < MaxRetries - 1) + { + response.Dispose(); + } + } + + return response; + } + } + + internal class VismaNetHttpClient + { + public static readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings + { + DateFormatString = "yyyy-MM-ddTHH:mm:ss.fffZ", + DateParseHandling = DateParseHandling.DateTime, + Converters = + { + new StringEnumConverter() + }, + NullValueHandling = NullValueHandling.Ignore + }; + + private static readonly HttpClient HttpClientStatic; + + private readonly Helpers.VismaNetAuthorization _authorization; + + private HttpClient HttpClient => _authorization.HttpClient ?? HttpClientStatic; + + static VismaNetHttpClient() + { + var handler = new HttpClientHandler(); + if (handler.SupportsAutomaticDecompression) + handler.AutomaticDecompression = System.Net.DecompressionMethods.GZip | + System.Net.DecompressionMethods.Deflate; + handler.UseCookies = false; +#if NET45 +#else + handler.MaxConnectionsPerServer = ClientSalesOrderV3.MaxConcurrentRequests; +#endif + + HttpClientStatic = new HttpClient(new RetryHandler(handler), false) + { + Timeout = TimeSpan.FromSeconds(1200) + }; + } + + internal VismaNetHttpClient(Helpers.VismaNetAuthorization auth = null) + { + _authorization = auth; + } + + internal HttpRequestMessage PrepareMessage(HttpMethod method, string resource) + { + var message = new HttpRequestMessage(method, resource); + if (_authorization != null) + { + if (_authorization.VismaConnectClientId != null) // new auth via Visma Connect + { + // Check for token expired ( 5 minutes grace ) + if (_authorization.VismaConnectToken == null || _authorization.VismaConnectTokenExpire.AddMinutes(-5) > DateTimeOffset.UtcNow) + { + var vToken = VismaNetApiHelper.GetTokenFromVismaConnect(_authorization.VismaConnectClientId, _authorization.VismaConnectClientSecret, _authorization.VismaConnectTenantId, _authorization.VismaConnectScopes).Result; + _authorization.VismaConnectToken = vToken.access_token; + _authorization.VismaConnectTokenExpire = vToken.expires_on; + } + message.Headers.Authorization = new AuthenticationHeaderValue("Bearer", _authorization.VismaConnectToken); + } + else + { + message.Headers.Authorization = new AuthenticationHeaderValue("Bearer", _authorization.Token); + message.Headers.Add("ipp-company-id", string.Format("{0}", _authorization.CompanyId)); + if (_authorization.BranchId > 0) + message.Headers.Add("branchid", _authorization.BranchId.ToString()); + } + } + message.Headers.Add("ipp-application-type", VismaNetApiHelper.ApplicationType); + message.Headers.ExpectContinue = false; + message.Headers.Accept.Clear(); + message.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); + if (!string.IsNullOrEmpty(ClientSalesOrderV3._ApplicationName)) + { + message.Headers.Add("User-Agent", + $"Visma.Net/{ClientSalesOrderV3.Version} (+https://github.com/ON-IT/Visma.Net) ({ClientSalesOrderV3._ApplicationName})"); + } + else + { + message.Headers.Add("User-Agent", $"Visma.Net/{ClientSalesOrderV3.Version} (+https://github.com/ON-IT/Visma.Net)"); + } + return message; + } + + internal async Task PostMessageVismaConnect(string url, HttpContent httpContent) + { + var message = PrepareMessage(HttpMethod.Post, url); + message.Content = httpContent; + var result = await HttpClient.SendAsync(message); + string content = await result.Content.ReadAsStringAsync(); + JObject jsonObj = null; + if (!string.IsNullOrEmpty(content)) + jsonObj = JsonConvert.DeserializeObject(content); + + if (!result.IsSuccessStatusCode) + { + if (!string.IsNullOrEmpty(content)) + { + throw new Exceptions.VismaConnectException($"Error: {jsonObj["error"].Value()}, statuscode: {(int)result.StatusCode} {result.ReasonPhrase}", content); + } + else + { + throw new Exceptions.VismaConnectException($"Unknown error, statuscode: {(int)result.StatusCode} {result.ReasonPhrase}"); + } + + } + else + { + return jsonObj; + } + } + + private string Serialize(object obj) + { + return JsonConvert.SerializeObject(obj, Formatting.Indented, SerializerSettings); + } + + private T Deserialize(string str) + { + return JsonConvert.DeserializeObject(str); + } + + // http://stackoverflow.com/a/24115672/491094 + internal static IEnumerable DeserializeSequenceFromJson(TextReader readerStream) + { + using (var reader = new JsonTextReader(readerStream)) + { + var serializer = new JsonSerializer(); + if (!reader.Read() || reader.TokenType != JsonToken.StartArray) + throw new Exception("Expected start of array in the deserialized json string"); + + while (reader.Read()) + { + if (reader.TokenType == JsonToken.EndArray) break; + var item = serializer.Deserialize(reader); + yield return item; + } + } + } + + public async Task Delete(string url) + { + var message = PrepareMessage(HttpMethod.Delete, url); + var result = await HttpClient.SendAsync(message); + return result.StatusCode == System.Net.HttpStatusCode.NoContent; + } + } +} diff --git a/Visma.net/SalesOrderV3/Models/Contracts.cs b/Visma.Net.SalesOrderNG/Models/Contracts.cs similarity index 99% rename from Visma.net/SalesOrderV3/Models/Contracts.cs rename to Visma.Net.SalesOrderNG/Models/Contracts.cs index 5805c79..bae4201 100644 --- a/Visma.net/SalesOrderV3/Models/Contracts.cs +++ b/Visma.Net.SalesOrderNG/Models/Contracts.cs @@ -13,7 +13,7 @@ #pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" #pragma warning disable 8603 // Disable "CS8603 Possible null reference return" -namespace ONIT.VismaNetApi.SalesOrderV3.Models +namespace Visma.Net.SalesOrderNG.Models { using System = global::System; diff --git a/Visma.Net.SalesOrderNG/Visma.Net.SalesOrderNG.csproj b/Visma.Net.SalesOrderNG/Visma.Net.SalesOrderNG.csproj new file mode 100644 index 0000000..cd43786 --- /dev/null +++ b/Visma.Net.SalesOrderNG/Visma.Net.SalesOrderNG.csproj @@ -0,0 +1,17 @@ + + + + netstandard2.0;net462;net6 + + + + + + + + + + + + + diff --git a/Visma.net.SalesOrder.nswag b/Visma.Net.SalesOrderNG/Visma.net.SalesOrder.nswag similarity index 100% rename from Visma.net.SalesOrder.nswag rename to Visma.Net.SalesOrderNG/Visma.net.SalesOrder.nswag diff --git a/Visma.net.sln b/Visma.net.sln index 1e8bf27..7031224 100644 --- a/Visma.net.sln +++ b/Visma.net.sln @@ -20,6 +20,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{CAE6FE EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Visma.net.Tests", "Visma.net.Tests\Visma.net.Tests.csproj", "{968B96DD-DE9F-4326-AE15-623831C871C3}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Visma.Net.SalesOrderNG", "Visma.Net.SalesOrderNG\Visma.Net.SalesOrderNG.csproj", "{599A02C3-9AA5-4554-82C3-B515FE0DD3EC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -34,6 +36,10 @@ Global {968B96DD-DE9F-4326-AE15-623831C871C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {968B96DD-DE9F-4326-AE15-623831C871C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {968B96DD-DE9F-4326-AE15-623831C871C3}.Release|Any CPU.Build.0 = Release|Any CPU + {599A02C3-9AA5-4554-82C3-B515FE0DD3EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {599A02C3-9AA5-4554-82C3-B515FE0DD3EC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {599A02C3-9AA5-4554-82C3-B515FE0DD3EC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {599A02C3-9AA5-4554-82C3-B515FE0DD3EC}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Visma.net/Dynamic/VismaNetDynamicHandler.cs b/Visma.net/Dynamic/VismaNetDynamicHandler.cs index 4dead1f..20236dd 100644 --- a/Visma.net/Dynamic/VismaNetDynamicHandler.cs +++ b/Visma.net/Dynamic/VismaNetDynamicHandler.cs @@ -6,6 +6,7 @@ namespace ONIT.VismaNetApi.Dynamic public abstract class VismaNetDynamicHandler : DynamicObject { protected VismaNetAuthorization Auth; + protected Visma.Net.SalesOrderNG.Helpers.VismaNetAuthorization AuthNG; public override bool TryGetMember(GetMemberBinder binder, out object result) { diff --git a/Visma.net/SalesOrderV3/Extensions/SalesOrderExtensions.cs b/Visma.net/Extensions/SalesOrderExtensions.cs similarity index 97% rename from Visma.net/SalesOrderV3/Extensions/SalesOrderExtensions.cs rename to Visma.net/Extensions/SalesOrderExtensions.cs index 7ea340d..848591c 100644 --- a/Visma.net/SalesOrderV3/Extensions/SalesOrderExtensions.cs +++ b/Visma.net/Extensions/SalesOrderExtensions.cs @@ -1,11 +1,11 @@ using ONIT.VismaNetApi.Models.Enums; -using ONIT.VismaNetApi.SalesOrderV3.Models; +using Visma.Net.SalesOrderNG.Models; using System; using System.Collections.Generic; using System.Text; -namespace ONIT.VismaNetApi.SalesOrderV3.Extensions +namespace ONIT.VismaNetApi.Extensions { @@ -161,11 +161,11 @@ public static ONIT.VismaNetApi.Models.SalesOrder fromV3SalesOrder(this ONIT.Vism ONIT.VismaNetApi.Models.SalesOrder v2SalesOrder; if (v3SalesOrder.OrderId != null) { - v2SalesOrder = new VismaNetApi.Models.SalesOrder(v3SalesOrder.OrderId, v3SalesOrder.Type); + v2SalesOrder = new ONIT.VismaNetApi.Models.SalesOrder(v3SalesOrder.OrderId, v3SalesOrder.Type); } else { - v2SalesOrder = new VismaNetApi.Models.SalesOrder(); + v2SalesOrder = new ONIT.VismaNetApi.Models.SalesOrder(); } v2SalesOrder.customer = v3SalesOrder.Customer.Id; @@ -174,7 +174,7 @@ public static ONIT.VismaNetApi.Models.SalesOrder fromV3SalesOrder(this ONIT.Vism v2SalesOrder.contactId = v2SalesOrder.contactId; if (v3SalesOrder.Customer.Location != null) { - v2SalesOrder.location = new VismaNetApi.Models.CustomDto.LocationSummary(); + v2SalesOrder.location = new ONIT.VismaNetApi.Models.CustomDto.LocationSummary(); v2SalesOrder.location.id = v3SalesOrder.Customer.Location.Id; } v2SalesOrder.gln = v3SalesOrder.Customer.Location?.Gln; @@ -273,7 +273,7 @@ public static ONIT.VismaNetApi.Models.SalesOrder fromV3SalesOrder(this ONIT.Vism foreach (var l in v3salesOrderLines) { - var newline = new VismaNetApi.Models.SalesOrderLine(); + var newline = new ONIT.VismaNetApi.Models.SalesOrderLine(); newline.lineDescription = l.Description; if (l.DiscountAmount != null) newline.discountAmount = (double)l.DiscountAmount; diff --git a/Visma.net/SalesOrderV3/Helpers/SalesOrderHelper.cs b/Visma.net/Extensions/SalesOrderHelper.cs similarity index 78% rename from Visma.net/SalesOrderV3/Helpers/SalesOrderHelper.cs rename to Visma.net/Extensions/SalesOrderHelper.cs index 7121197..34128a0 100644 --- a/Visma.net/SalesOrderV3/Helpers/SalesOrderHelper.cs +++ b/Visma.net/Extensions/SalesOrderHelper.cs @@ -1,9 +1,9 @@ -using ONIT.VismaNetApi.SalesOrderV3.Models; +using Visma.Net.SalesOrderNG.Models; using System; using System.Collections.Generic; using System.Text; -namespace ONIT.VismaNetApi.SalesOrderV3.Helpers +namespace ONIT.VismaNetApi.Extensions { public class SalesOrderHelper { diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index 6bf46fb..14da8ee 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -57,4 +57,7 @@ 12.0.1 + + + \ No newline at end of file diff --git a/Visma.net/VismaNet.cs b/Visma.net/VismaNet.cs index 743f720..d5e5926 100644 --- a/Visma.net/VismaNet.cs +++ b/Visma.net/VismaNet.cs @@ -13,6 +13,7 @@ using System.Runtime.InteropServices; using System.Threading.Tasks; + namespace ONIT.VismaNetApi { [ComVisible(true)] @@ -61,10 +62,11 @@ public class VismaNet : VismaNetDynamicHandler public readonly PurchaseReceiptData PurchaseReceipt; public readonly PurchaseOrderData PurchaseOrder; - public readonly SalesOrderV3.ClientSalesOrderV3 SalesOrderV3; + public readonly Visma.Net.SalesOrderNG.ClientSalesOrderV3 SalesOrderV3; + // Obsolete - [Obsolete("SALES ORDER WILL STOP WORKING 2023-06-01! Replaced by https://salesorder.visma.net. use SalesOrderV3.")] + [Obsolete("SALES ORDER WILL STOP WORKING 2024-12-31! Replaced by https://salesorder.visma.net. use SalesOrderV3.")] public readonly SalesOrderData SalesOrder; [Obsolete("Deprecated. Start using the new method in endpoint Customer Credit Note.", true)] @@ -96,6 +98,19 @@ public VismaNet(int companyId, string token, int branchId = 0, HttpClient httpCl VismaConnectTenantId = VismaConnectTenantId, VismaConnectScopes = VismaConnectScopes }; + + AuthNG = new Visma.Net.SalesOrderNG.Helpers.VismaNetAuthorization + { + Token = token, + CompanyId = companyId, + BranchId = branchId, + HttpClient = httpClient, + VismaConnectClientId = VismaConnectClientId, + VismaConnectClientSecret = VismaConnectClientSecret, + VismaConnectTenantId = VismaConnectTenantId, + VismaConnectScopes = VismaConnectScopes + }; + Attribute = new AttributeData(Auth); Customer = new CustomerData(Auth); Currency = new CurrencyData(Auth); @@ -137,7 +152,7 @@ public VismaNet(int companyId, string token, int branchId = 0, HttpClient httpCl PurchaseOrder = new PurchaseOrderData(Auth); CashTransaction = new CashTransactionData(Auth); Background = new BackgroundData(Auth); - SalesOrderV3 = new SalesOrderV3.ClientSalesOrderV3(Auth); + SalesOrderV3 = new Visma.Net.SalesOrderNG.ClientSalesOrderV3(AuthNG,VismaNet.ApplicationName); } /// diff --git a/Visma.net/lib/VismaNetApiHelper.cs b/Visma.net/lib/VismaNetApiHelper.cs index b41b147..c3500f0 100644 --- a/Visma.net/lib/VismaNetApiHelper.cs +++ b/Visma.net/lib/VismaNetApiHelper.cs @@ -579,7 +579,7 @@ internal static async Task GetTokenOAuth(string clientId, string secret, return data["token"].Value(); } } - internal static async Task GetTokenFromVismaConnect(string clientId, string secret, string tenant_id, string scope = "vismanet_erp_service_api:create vismanet_erp_service_api:delete vismanet_erp_service_api:read vismanet_erp_service_api:update") + public static async Task GetTokenFromVismaConnect(string clientId, string secret, string tenant_id, string scope = "vismanet_erp_service_api:create vismanet_erp_service_api:delete vismanet_erp_service_api:read vismanet_erp_service_api:update") { try { diff --git a/Visma.net/lib/VismaNetControllers.cs b/Visma.net/lib/VismaNetControllers.cs index d8a8df7..0500d45 100644 --- a/Visma.net/lib/VismaNetControllers.cs +++ b/Visma.net/lib/VismaNetControllers.cs @@ -60,7 +60,6 @@ internal static class VismaNetControllers public const string OAuthAuthorize = "resources/oauth/authorize"; public const string UserContext = "resources/v1/context"; - // SalesOrderV3 - public const string SalesOrderV3BaseUrl = "https://salesorder.visma.net/"; + } } From f84b027ab84714d8db7b56615ecf337ead11d304 Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Fri, 29 Sep 2023 10:29:09 +0200 Subject: [PATCH 20/37] Fixes for OrderV3 client --- .../ClientSalesOrderV3.Extensions.cs | 5 +- Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs | 513 +++++++++-- Visma.Net.SalesOrderNG/Models/Contracts.cs | 793 ++++++++++++++++-- .../Visma.Net.SalesOrderNG.csproj | 3 + .../Visma.net.SalesOrder.nswag | 10 +- Visma.net/Dynamic/VismaNetDynamicHandler.cs | 3 +- Visma.net/Visma.net.csproj | 21 +- Visma.net/VismaNet.cs | 27 +- 8 files changed, 1201 insertions(+), 174 deletions(-) diff --git a/Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs b/Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs index 37a8149..b7dac3c 100644 --- a/Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs +++ b/Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs @@ -12,6 +12,8 @@ using System.Threading.Tasks; using Visma.Net.SalesOrderNG.Lib; using System.Reflection; +using Newtonsoft.Json.Linq; +using System.IdentityModel.Tokens.Jwt; namespace Visma.Net.SalesOrderNG { @@ -61,7 +63,8 @@ public ClientSalesOrderV3(Helpers.VismaNetAuthorization auth, string Application partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder) { urlBuilder.Insert(0, VismaNetControllers.SalesOrderV3BaseUrl); - if (!_authorization.VismaConnectScopes.Contains("visma.net.erp.salesorder")) + var jwtToken = new JwtSecurityToken(_authorization.Token); + if (!_authorization.VismaConnectScopes.Contains("visma.net.erp.salesorder") && !jwtToken.Claims.Any(c => c.Value.Contains("visma.net.erp.salesorder"))) { throw new VismaConnectException("Scope has to contain visma.net.erp.salesorder scopes to use SalesOrderV3"); } diff --git a/Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs b/Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs index 8e1b7b0..0166583 100644 --- a/Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs +++ b/Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs @@ -1,6 +1,6 @@ //---------------------- // -// Generated using the NSwag toolchain v13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0)) (http://NSwag.org) +// Generated using the NSwag toolchain v13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0)) (http://NSwag.org) // //---------------------- @@ -9,24 +9,26 @@ #pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." #pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." #pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' +#pragma warning disable 612 // Disable "CS0612 '...' is obsolete" #pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... #pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." #pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" #pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" #pragma warning disable 8603 // Disable "CS8603 Possible null reference return" +#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" namespace Visma.Net.SalesOrderNG { using System = global::System; - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class ClientSalesOrderV3 { private System.Lazy _settings; public ClientSalesOrderV3() { - _settings = new System.Lazy(CreateSerializerSettings); + _settings = new System.Lazy(CreateSerializerSettings, true); } private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() @@ -45,44 +47,41 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); /// - /// Gets a list of customers + /// Gets a list of locations for the specified customer /// - /// An optional text string to find customers matching (searching fields id, name, gln, tax registration id). If not specified all customers are returned. - /// The number of customers retrieved per page. If not specified, the default value of 100 will be used. - /// The zero based page index to retrieve - /// Returns the list of customers found + /// + /// Sample rquest: + ///
+ ///
GET /customers/10000/locations + ///
+ /// The customer id (CustomerCd) to retrieve locations for + /// List of locations for the specified customer /// A server side error occurred. - public virtual System.Threading.Tasks.Task> Customers_GetList_Async(string filter, int? pageSize, int? pageIndex) + public virtual System.Threading.Tasks.Task>> Customers_GetCustomerLocationList_customerIdlocationsAsync(string customerId) { - return Customers_GetList_Async(filter, pageSize, pageIndex, System.Threading.CancellationToken.None); + return Customers_GetCustomerLocationList_customerIdlocationsAsync(customerId, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// - /// Gets a list of customers + /// Gets a list of locations for the specified customer /// - /// An optional text string to find customers matching (searching fields id, name, gln, tax registration id). If not specified all customers are returned. - /// The number of customers retrieved per page. If not specified, the default value of 100 will be used. - /// The zero based page index to retrieve - /// Returns the list of customers found + /// + /// Sample rquest: + ///
+ ///
GET /customers/10000/locations + ///
+ /// The customer id (CustomerCd) to retrieve locations for + /// List of locations for the specified customer /// A server side error occurred. - public virtual async System.Threading.Tasks.Task> Customers_GetList_Async(string filter, int? pageSize, int? pageIndex, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task>> Customers_GetCustomerLocationList_customerIdlocationsAsync(string customerId, System.Threading.CancellationToken cancellationToken) { + if (customerId == null) + throw new System.ArgumentNullException("customerId"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/v3/Customers?"); - if (filter != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (pageSize != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("pageSize") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (pageIndex != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("pageIndex") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageIndex, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; + urlBuilder_.Append("api/v3/Customers/{customerId}/locations"); + urlBuilder_.Replace("{customerId}", System.Uri.EscapeDataString(ConvertToString(customerId, System.Globalization.CultureInfo.InvariantCulture))); var client_ = new System.Net.Http.HttpClient(); var disposeClient_ = true; @@ -116,22 +115,22 @@ public virtual async System.Threading.Tasks.Task(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } - return new SwaggerResponse(status_, headers_, objectResponse_.Object); + return new SwaggerResponse>(status_, headers_, objectResponse_.Object); } else - if (status_ == 400) + if (status_ == 404) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } - throw new ApiException("If pageSize or pageIndex is not within the allowed range", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + throw new ApiException("If customer with id customerId is not found or is not accessible", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else if (status_ == 401) @@ -166,31 +165,54 @@ public virtual async System.Threading.Tasks.Task - /// Gets a list of locations for the specified customer + /// Gets a list of customers ///
- /// The customer id (CustomerCd) to retrieve locations for - /// List of locations for the specified customer + /// + /// Sample request: + ///
+ ///
GET /customers?filter=visma&pageSize=10 + ///
+ /// An optional text string to find customers matching (searching fields id, name, gln, tax registration id). If not specified all customers are returned. + /// The number of customers retrieved per page. If not specified, the default value of 100 will be used. + /// The zero based page index to retrieve + /// Returns the list of customers found /// A server side error occurred. - public virtual System.Threading.Tasks.Task>> Customers_GetCustomerLocationList_customerIdlocationsAsync(string customerId) + public virtual System.Threading.Tasks.Task> Customers_GetList_Async(string filter, int? pageSize, int? pageIndex) { - return Customers_GetCustomerLocationList_customerIdlocationsAsync(customerId, System.Threading.CancellationToken.None); + return Customers_GetList_Async(filter, pageSize, pageIndex, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// - /// Gets a list of locations for the specified customer + /// Gets a list of customers /// - /// The customer id (CustomerCd) to retrieve locations for - /// List of locations for the specified customer + /// + /// Sample request: + ///
+ ///
GET /customers?filter=visma&pageSize=10 + ///
+ /// An optional text string to find customers matching (searching fields id, name, gln, tax registration id). If not specified all customers are returned. + /// The number of customers retrieved per page. If not specified, the default value of 100 will be used. + /// The zero based page index to retrieve + /// Returns the list of customers found /// A server side error occurred. - public virtual async System.Threading.Tasks.Task>> Customers_GetCustomerLocationList_customerIdlocationsAsync(string customerId, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task> Customers_GetList_Async(string filter, int? pageSize, int? pageIndex, System.Threading.CancellationToken cancellationToken) { - if (customerId == null) - throw new System.ArgumentNullException("customerId"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/v3/Customers/{customerId}/locations"); - urlBuilder_.Replace("{customerId}", System.Uri.EscapeDataString(ConvertToString(customerId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("api/v3/Customers?"); + if (filter != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("filter") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (pageSize != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("pageSize") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (pageIndex != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("pageIndex") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageIndex, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + urlBuilder_.Length--; var client_ = new System.Net.Http.HttpClient(); var disposeClient_ = true; @@ -224,22 +246,22 @@ public virtual async System.Threading.Tasks.Task>(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } - return new SwaggerResponse>(status_, headers_, objectResponse_.Object); + return new SwaggerResponse(status_, headers_, objectResponse_.Object); } else - if (status_ == 404) + if (status_ == 400) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } - throw new ApiException("If customer with id customerId is not found or is not accessible", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + throw new ApiException("If pageSize or pageIndex is not within the allowed range", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else if (status_ == 401) @@ -276,6 +298,17 @@ public virtual async System.Threading.Tasks.Task /// Gets an inventory summary for inventory items. ///
+ /// + /// Sample request: + ///
+ ///
GET /inventory?inventoryId=Item1 + ///
+ ///
GET /inventory?warehouseId=MAIN&modifiedSince=2021-08-01T12:00:00&pageSize=1000 + ///
+ ///
GET /inventory?inventoryId=Item1&InventoryId=Item2&expand=location,attribute + ///
+ ///
GET /inventory?expand=location&attributeFilter=WEBSHOP:1 + ///
/// A list of zero or more inventory items to get a summary for. If no inventoryId is passed, all inventory items will be included in the response. /// A list of zero or more warehouses to get a summary for. If no warehouse is supplied, all warehouses will be included in the response. /// A list of zero or more locations to get a summary for. If no location is supplied, all locations will be included in the response. @@ -297,6 +330,17 @@ public virtual System.Threading.Tasks.Task /// Gets an inventory summary for inventory items. /// + /// + /// Sample request: + ///
+ ///
GET /inventory?inventoryId=Item1 + ///
+ ///
GET /inventory?warehouseId=MAIN&modifiedSince=2021-08-01T12:00:00&pageSize=1000 + ///
+ ///
GET /inventory?inventoryId=Item1&InventoryId=Item2&expand=location,attribute + ///
+ ///
GET /inventory?expand=location&attributeFilter=WEBSHOP:1 + ///
/// A list of zero or more inventory items to get a summary for. If no inventoryId is passed, all inventory items will be included in the response. /// A list of zero or more warehouses to get a summary for. If no warehouse is supplied, all warehouses will be included in the response. /// A list of zero or more locations to get a summary for. If no location is supplied, all locations will be included in the response. @@ -431,6 +475,14 @@ public virtual async System.Threading.Tasks.Task /// Gets information about a single sales order /// + /// + /// The expand query parameter corresponds to sections in the Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDto. + ///
If an expand value is not specified it will not be filled and returned in the response object. + ///
+ ///
Sample request: + ///
+ ///
`GET /salesorders/SO/000100?expand=customer,payment` + ///
/// The type of sales order to get /// The id of the sales order to get /// An optional specification of what details to include about the sales order. The default value if not supplied is "None" @@ -445,6 +497,14 @@ public virtual System.Threading.Tasks.Task> Sales /// /// Gets information about a single sales order /// + /// + /// The expand query parameter corresponds to sections in the Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDto. + ///
If an expand value is not specified it will not be filled and returned in the response object. + ///
+ ///
Sample request: + ///
+ ///
`GET /salesorders/SO/000100?expand=customer,payment` + ///
/// The type of sales order to get /// The id of the sales order to get /// An optional specification of what details to include about the sales order. The default value if not supplied is "None" @@ -552,6 +612,10 @@ public virtual async System.Threading.Tasks.Task> /// /// Make modifications to an existing sales order /// + /// + /// If-Match header represents a version of Sales Order to be modified and must be included in request. + ///
Value of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header. + ///
/// The type of the order to make modifications to /// The order number to make modifications to /// Data to change about the sales order @@ -566,6 +630,10 @@ public virtual System.Threading.Tasks.Task SalesOrders_Patch_ty /// /// Make modifications to an existing sales order /// + /// + /// If-Match header represents a version of Sales Order to be modified and must be included in request. + ///
Value of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header. + ///
/// The type of the order to make modifications to /// The order number to make modifications to /// Data to change about the sales order @@ -590,7 +658,8 @@ public virtual async System.Threading.Tasks.Task SalesOrders_Pa { using (var request_ = new System.Net.Http.HttpRequestMessage()) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; request_.Method = new System.Net.Http.HttpMethod("PATCH"); @@ -715,6 +784,10 @@ public virtual async System.Threading.Tasks.Task SalesOrders_Pa /// /// Delete an existing sales order /// + /// + /// If-Match header represents a version of Sales Order to be modified and must be included in request. + ///
Value of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header. + ///
/// The type of the order to delete /// The order number to delete /// The order was deleted successfully @@ -728,6 +801,10 @@ public virtual System.Threading.Tasks.Task SalesOrders_Delete_t /// /// Delete an existing sales order /// + /// + /// If-Match header represents a version of Sales Order to be modified and must be included in request. + ///
Value of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header. + ///
/// The type of the order to delete /// The order number to delete /// The order was deleted successfully @@ -843,6 +920,15 @@ public virtual async System.Threading.Tasks.Task SalesOrders_De /// /// Gets a paged list with sales orders of a specific type /// + /// + /// Sample requests: + ///
+ ///
`GET /salesorders/SO` + ///
+ ///
`GET /salesorders/SO?customerId=10000&status=Open&pageSize=10` + ///
+ ///
`GET /salesorders/SO?orderBy=created%20desc` + ///
/// The type of sales orders to get. /// The customer for which to retrieve orders. If omitted or empty, orders for all customers are included /// The order status to include in the result. If omitted or empty, orders with any status are included. @@ -863,6 +949,15 @@ public virtual System.Threading.Tasks.Task /// Gets a paged list with sales orders of a specific type /// + /// + /// Sample requests: + ///
+ ///
`GET /salesorders/SO` + ///
+ ///
`GET /salesorders/SO?customerId=10000&status=Open&pageSize=10` + ///
+ ///
`GET /salesorders/SO?orderBy=created%20desc` + ///
/// The type of sales orders to get. /// The customer for which to retrieve orders. If omitted or empty, orders for all customers are included /// The order status to include in the result. If omitted or empty, orders with any status are included. @@ -996,6 +1091,15 @@ public virtual async System.Threading.Tasks.Task /// Gets a paged list with sales orders of any type /// + /// + /// Sample requests: + ///
+ ///
`GET /salesorders` + ///
+ ///
`GET /salesorders?customerId=10000&status=Open&pageSize=10` + ///
+ ///
`GET /salesorders?orderBy=lastModified%20asc` + ///
/// The customer for which to retrieve orders. If omitted or empty, orders for all customers are included /// The order status to include in the result. If omitted or empty, orders with any status are included. /// A date/time value for filtering when a sales order last changed. @@ -1015,6 +1119,15 @@ public virtual System.Threading.Tasks.Task /// Gets a paged list with sales orders of any type /// + /// + /// Sample requests: + ///
+ ///
`GET /salesorders` + ///
+ ///
`GET /salesorders?customerId=10000&status=Open&pageSize=10` + ///
+ ///
`GET /salesorders?orderBy=lastModified%20asc` + ///
/// The customer for which to retrieve orders. If omitted or empty, orders for all customers are included /// The order status to include in the result. If omitted or empty, orders with any status are included. /// A date/time value for filtering when a sales order last changed. @@ -1143,6 +1256,38 @@ public virtual async System.Threading.Tasks.Task /// Adds a new sales order to the system /// + /// + /// Sample requests: + ///
+ ///
``` + ///
POST /salesorders + ///
{ + ///
"customer": { + ///
"id": "10001", + ///
}, + ///
"type": "SO" + ///
} + ///
``` + ///
``` + ///
POST /salesorders + ///
{ + ///
"customer": { + ///
"id": "10000", + ///
"order": "some-customer-order-nbr" + ///
}, + ///
"type": "SO", + ///
"description": "sample request order", + ///
"status": "Hold", + ///
"orderLines": [ + ///
{ + ///
"inventoryId": "StockItem1", + ///
"quantity": 4, + ///
"unitPrice": 101.25 + ///
} + ///
] + ///
} + ///
``` + ///
/// Information about the sales order to create /// The order was created successfully, and the Location request header contains the address to call to GET the new sales order /// A server side error occurred. @@ -1155,6 +1300,38 @@ public virtual System.Threading.Tasks.Task SalesOrders_CreateNe /// /// Adds a new sales order to the system /// + /// + /// Sample requests: + ///
+ ///
``` + ///
POST /salesorders + ///
{ + ///
"customer": { + ///
"id": "10001", + ///
}, + ///
"type": "SO" + ///
} + ///
``` + ///
``` + ///
POST /salesorders + ///
{ + ///
"customer": { + ///
"id": "10000", + ///
"order": "some-customer-order-nbr" + ///
}, + ///
"type": "SO", + ///
"description": "sample request order", + ///
"status": "Hold", + ///
"orderLines": [ + ///
{ + ///
"inventoryId": "StockItem1", + ///
"quantity": 4, + ///
"unitPrice": 101.25 + ///
} + ///
] + ///
} + ///
``` + ///
/// Information about the sales order to create /// The order was created successfully, and the Location request header contains the address to call to GET the new sales order /// A server side error occurred. @@ -1169,7 +1346,8 @@ public virtual async System.Threading.Tasks.Task SalesOrders_Cr { using (var request_ = new System.Net.Http.HttpRequestMessage()) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; request_.Method = new System.Net.Http.HttpMethod("POST"); @@ -1254,6 +1432,11 @@ public virtual async System.Threading.Tasks.Task SalesOrders_Cr /// /// Gets ROT/RUT information for a single sales order /// + /// + /// Sample request: + ///
+ ///
`GET /salesorders/SO/000123/rotrut` + ///
/// The type of sales order to get /// The id of the sales order to get /// A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderRotRutDto if found and accessible @@ -1267,6 +1450,11 @@ public virtual System.Threading.Tasks.Task> /// /// Gets ROT/RUT information for a single sales order /// + /// + /// Sample request: + ///
+ ///
`GET /salesorders/SO/000123/rotrut` + ///
/// The type of sales order to get /// The id of the sales order to get /// A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderRotRutDto if found and accessible @@ -1368,6 +1556,11 @@ public virtual async System.Threading.Tasks.Task /// Gets commission information for a single sales order /// + /// + /// Sample request: + ///
+ ///
`GET /salesorders/SO/000101/commissions` + ///
/// The type of sales order to get /// The id of the sales order to get /// A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderCommissionDto if found and accessible @@ -1381,6 +1574,11 @@ public virtual async System.Threading.Tasks.Task /// Gets commission information for a single sales order /// + /// + /// Sample request: + ///
+ ///
`GET /salesorders/SO/000101/commissions` + ///
/// The type of sales order to get /// The id of the sales order to get /// A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderCommissionDto if found and accessible @@ -1482,6 +1680,11 @@ public virtual async System.Threading.Tasks.Task /// Gets sales order lines for a single sales order /// + /// + /// Sample request: + ///
+ ///
`GET /salesorders/SO/000101/lines` + ///
/// The type of sales order to get /// The id of the sales order to get /// The number of lines retrieved per page, defaults to 1000 if not specified @@ -1497,6 +1700,11 @@ public virtual System.Threading.Tasks.Task /// Gets sales order lines for a single sales order /// + /// + /// Sample request: + ///
+ ///
`GET /salesorders/SO/000101/lines` + ///
/// The type of sales order to get /// The id of the sales order to get /// The number of lines retrieved per page, defaults to 1000 if not specified @@ -1609,6 +1817,10 @@ public virtual async System.Threading.Tasks.Task /// Make modifications to an existing sales order lines /// + /// + /// If-Match header represents a version of Sales Order to be modified and must be included in request. + ///
Value of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header. + ///
/// The type of the order to make modifications to /// The order number to make modifications to /// Data to change about the sales order lines @@ -1623,6 +1835,10 @@ public virtual System.Threading.Tasks.Task SalesOrders_PatchLin /// /// Make modifications to an existing sales order lines /// + /// + /// If-Match header represents a version of Sales Order to be modified and must be included in request. + ///
Value of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header. + ///
/// The type of the order to make modifications to /// The order number to make modifications to /// Data to change about the sales order lines @@ -1647,7 +1863,8 @@ public virtual async System.Threading.Tasks.Task SalesOrders_Pa { using (var request_ = new System.Net.Http.HttpRequestMessage()) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; request_.Method = new System.Net.Http.HttpMethod("PATCH"); @@ -1762,6 +1979,10 @@ public virtual async System.Threading.Tasks.Task SalesOrders_Pa /// /// Delete lines from an existing sales order /// + /// + /// If-Match header represents a version of Sales Order to be modified and must be included in request. + ///
Value of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header. + ///
/// The type of the order to make modifications to /// The order number to make modifications to /// Lines to delete with comma seprator. Limit of line ids is 1000. @@ -1776,6 +1997,10 @@ public virtual System.Threading.Tasks.Task SalesOrders_DeleteLi /// /// Delete lines from an existing sales order /// + /// + /// If-Match header represents a version of Sales Order to be modified and must be included in request. + ///
Value of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header. + ///
/// The type of the order to make modifications to /// The order number to make modifications to /// Lines to delete with comma seprator. Limit of line ids is 1000. @@ -1897,6 +2122,10 @@ public virtual async System.Threading.Tasks.Task SalesOrders_De /// /// Adds new lines to a existing sales order in the system /// + /// + /// If-Match header represents a version of Sales Order to be modified and must be included in request. + ///
Value of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header. + ///
/// Information about the lines to create /// The order lines where created successfully, and the Location request header contains the address to call to GET the new sales order /// A server side error occurred. @@ -1909,6 +2138,10 @@ public virtual System.Threading.Tasks.Task SalesOrders_AddLines /// /// Adds new lines to a existing sales order in the system /// + /// + /// If-Match header represents a version of Sales Order to be modified and must be included in request. + ///
Value of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header. + ///
/// Information about the lines to create /// The order lines where created successfully, and the Location request header contains the address to call to GET the new sales order /// A server side error occurred. @@ -1931,7 +2164,8 @@ public virtual async System.Threading.Tasks.Task SalesOrders_Ad { using (var request_ = new System.Net.Http.HttpRequestMessage()) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; request_.Method = new System.Net.Http.HttpMethod("POST"); @@ -2026,6 +2260,11 @@ public virtual async System.Threading.Tasks.Task SalesOrders_Ad /// /// Gets a specific sales order line for a single sales order /// + /// + /// Sample request: + ///
+ ///
`GET /salesorders/SO/000101/lines/1` + ///
/// The type of sales order to get /// The id of the sales order to get /// The id of the line to get @@ -2040,6 +2279,11 @@ public virtual System.Threading.Tasks.Task> S /// /// Gets a specific sales order line for a single sales order /// + /// + /// Sample request: + ///
+ ///
`GET /salesorders/SO/000101/lines/1` + ///
/// The type of sales order to get /// The id of the sales order to get /// The id of the line to get @@ -2146,6 +2390,11 @@ public virtual async System.Threading.Tasks.Task /// Gets tax information for a single sales order /// + /// + /// Sample request: + ///
+ ///
`GET /salesorders/SO/000101/tax` + ///
/// The type of sales order to get /// The id of the sales order to get /// A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderTaxDto if found and accessible @@ -2159,6 +2408,11 @@ public virtual async System.Threading.Tasks.Task /// Gets tax information for a single sales order /// + /// + /// Sample request: + ///
+ ///
`GET /salesorders/SO/000101/tax` + ///
/// The type of sales order to get /// The id of the sales order to get /// A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderTaxDto if found and accessible @@ -2257,9 +2511,138 @@ public virtual async System.Threading.Tasks.Task + /// Gets shipment information for a single sales order + /// + /// + /// Sample request: + ///
+ ///
`GET /salesorders/SO/000101/shipment` + ///
+ /// The type of sales order to get + /// The id of the sales order to get + /// A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderShipmentDto if found and accessible + /// A server side error occurred. + public virtual System.Threading.Tasks.Task>> SalesOrders_GetSalesOrderShipment_typeorderIdshipmentAsync(string type, string orderId) + { + return SalesOrders_GetSalesOrderShipment_typeorderIdshipmentAsync(type, orderId, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Gets shipment information for a single sales order + /// + /// + /// Sample request: + ///
+ ///
`GET /salesorders/SO/000101/shipment` + ///
+ /// The type of sales order to get + /// The id of the sales order to get + /// A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderShipmentDto if found and accessible + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task>> SalesOrders_GetSalesOrderShipment_typeorderIdshipmentAsync(string type, string orderId, System.Threading.CancellationToken cancellationToken) + { + if (type == null) + throw new System.ArgumentNullException("type"); + + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append("api/v3/SalesOrders/{type}/{orderId}/shipment"); + urlBuilder_.Replace("{type}", System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Replace("{orderId}", System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + + var client_ = new System.Net.Http.HttpClient(); + var disposeClient_ = true; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return new SwaggerResponse>(status_, headers_, objectResponse_.Object); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("If an order with type type and orderId is not found, or is not accessible.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Unauthorized", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Forbidden", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + /// /// Gets discount details information for a single sales order /// + /// + /// Sample request: + ///
+ ///
`GET /salesorders/SO/000101/discounts` + ///
/// The type of sales order to get /// The id of the sales order to get /// A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDiscountDto if found and accessible @@ -2273,6 +2656,11 @@ public virtual async System.Threading.Tasks.Task /// Gets discount details information for a single sales order /// + /// + /// Sample request: + ///
+ ///
`GET /salesorders/SO/000101/discounts` + ///
/// The type of sales order to get /// The id of the sales order to get /// A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDiscountDto if found and accessible @@ -2476,10 +2864,13 @@ private string ConvertToString(object value, System.Globalization.CultureInfo cu } -#pragma warning restore 1591 -#pragma warning restore 1573 -#pragma warning restore 472 -#pragma warning restore 114 #pragma warning restore 108 +#pragma warning restore 114 +#pragma warning restore 472 +#pragma warning restore 612 +#pragma warning restore 1573 +#pragma warning restore 1591 +#pragma warning restore 8073 #pragma warning restore 3016 -#pragma warning restore 8603 \ No newline at end of file +#pragma warning restore 8603 +#pragma warning restore 8604 \ No newline at end of file diff --git a/Visma.Net.SalesOrderNG/Models/Contracts.cs b/Visma.Net.SalesOrderNG/Models/Contracts.cs index bae4201..3b2b870 100644 --- a/Visma.Net.SalesOrderNG/Models/Contracts.cs +++ b/Visma.Net.SalesOrderNG/Models/Contracts.cs @@ -1,17 +1,19 @@ //---------------------- // -// Generated using the NSwag toolchain v13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0)) (http://NSwag.org) +// Generated using the NSwag toolchain v13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0)) (http://NSwag.org) // //---------------------- #pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." #pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." #pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' +#pragma warning disable 612 // Disable "CS0612 '...' is obsolete" #pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... #pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." #pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" #pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" #pragma warning disable 8603 // Disable "CS8603 Possible null reference return" +#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" namespace Visma.Net.SalesOrderNG.Models { @@ -19,7 +21,7 @@ namespace Visma.Net.SalesOrderNG.Models - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class AddSalesOrderLinesCommand { [Newtonsoft.Json.JsonProperty("lines", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -27,7 +29,7 @@ public partial class AddSalesOrderLinesCommand } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class AddressDto { /// @@ -80,7 +82,7 @@ public partial class AddressDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class CdDescriptionPairDto { /// @@ -97,7 +99,7 @@ public partial class CdDescriptionPairDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class CdNamePairDto { /// @@ -114,7 +116,7 @@ public partial class CdNamePairDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class ContactDto { /// @@ -170,7 +172,7 @@ public partial class ContactDto /// /// The Visma.net.ERP.SalesOrders.Api.Dto.CustomerDto class Defines a customer /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class CustomerDto { /// @@ -244,7 +246,7 @@ public partial class CustomerDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class CustomerDtoPagedResult { /// @@ -267,7 +269,7 @@ public partial class CustomerDtoPagedResult } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class CustomerLocationDto { /// @@ -320,7 +322,7 @@ public partial class CustomerLocationDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class CustomerLocationItemDto { /// @@ -383,9 +385,91 @@ public partial class CustomerLocationItemDto [Newtonsoft.Json.JsonProperty("priceClassId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string PriceClassId { get; set; } + /// + /// Default FobPointId + /// + [Newtonsoft.Json.JsonProperty("fobPointId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string FobPointId { get; set; } + + /// + /// Default ShipTermsId + /// + [Newtonsoft.Json.JsonProperty("shipTermsId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ShipTermsId { get; set; } + + /// + /// Default ShipZoneId + /// + [Newtonsoft.Json.JsonProperty("shipZoneId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ShipZoneId { get; set; } + + /// + /// The ship via id that represents the carrier and its service to be used for shipping the ordered goods + /// + [Newtonsoft.Json.JsonProperty("shipViaId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ShipViaId { get; set; } + + /// + /// Default ResidentialDelivery.<br /> + ///
This field will be removed with due date 1.12.2023. It is recommended to use <see cref="P:Visma.net.ERP.SalesOrders.Api.Dto.CustomerLocationItemDto.ResidentialDelivery">ResidentialDelivery</see> instead. + ///
+ [Newtonsoft.Json.JsonProperty("resedentialDelivery", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.Obsolete] + public bool ResedentialDelivery { get; set; } + + /// + /// Default ResidentialDelivery + /// + [Newtonsoft.Json.JsonProperty("residentialDelivery", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool ResidentialDelivery { get; set; } + + /// + /// Default SaturdayDelivery + /// + [Newtonsoft.Json.JsonProperty("saturdayDelivery", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool SaturdayDelivery { get; set; } + + /// + /// Default Insurance + /// + [Newtonsoft.Json.JsonProperty("insurance", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Insurance { get; set; } + + /// + /// Default Priority + /// + [Newtonsoft.Json.JsonProperty("priority", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Priority { get; set; } + + /// + /// Shipping rule of the customer set default for the order + ///
<br>Is one of the following options:<br><list type="bullet"><item><term>CancelRemainder: </term><description>The ordered quantity should be delivered in one shipment</description></item><item><term>BackOrderAllowed: </term><description>The ordered quantity can be delivered in multiple shipments.</description></item><item><term>ShipComplete: </term><description>The ordered quantity should be delivered in one shipment.</description></item></list> + ///
+ [Newtonsoft.Json.JsonProperty("shippingRule", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ShippingRule { get; set; } + + /// + /// The preferred shipping warehouse of the customer set default for the order + /// + [Newtonsoft.Json.JsonProperty("preferredWarehouseId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PreferredWarehouseId { get; set; } + + /// + /// The number of days required for the shipped goods to reach the customer. + ///
Used in the calculation of the scheduled shipment date + ///
+ [Newtonsoft.Json.JsonProperty("leadTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? LeadTime { get; set; } + + /// + /// The location tax/VAT zone id + /// + [Newtonsoft.Json.JsonProperty("taxZoneId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string TaxZoneId { get; set; } + } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class DtoLink { /// @@ -396,7 +480,7 @@ public partial class DtoLink } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class EmployeeDto { /// @@ -413,7 +497,7 @@ public partial class EmployeeDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class IdDescriptionPairDto { /// @@ -433,7 +517,7 @@ public partial class IdDescriptionPairDto /// /// Defines expansion options for the inventory summary endpoint. /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public enum InventoryAvailabilityExpansions { @@ -454,7 +538,7 @@ public enum InventoryAvailabilityExpansions /// /// Inventory summary for a specific inventory item /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class InventoryItemAvailabilityDto { /// @@ -495,7 +579,7 @@ public partial class InventoryItemAvailabilityDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class InventoryItemAvailabilityDtoPagedResult { /// @@ -518,7 +602,7 @@ public partial class InventoryItemAvailabilityDtoPagedResult } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class LocationAvailabilityDto { /// @@ -596,7 +680,7 @@ public partial class LocationAvailabilityDto /// /// Defines a warehouse location /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class LocationDto { /// @@ -618,7 +702,7 @@ public partial class LocationDto ///
When the address information is provided, it is expected to provide all needed fields for the address(line1, line2, countryId etc). ///
No default values from the customer will be set for the non defined address fields. ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class NewSalesOrderAddressDto { /// @@ -672,7 +756,7 @@ public partial class NewSalesOrderAddressDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class NewSalesOrderBillingDto { [Newtonsoft.Json.JsonProperty("contact", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -683,7 +767,7 @@ public partial class NewSalesOrderBillingDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class NewSalesOrderCommand { /// @@ -794,6 +878,45 @@ public partial class NewSalesOrderCommand [Newtonsoft.Json.JsonProperty("useReplacementCostForMarginAndProfit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? UseReplacementCostForMarginAndProfit { get; set; } + [Newtonsoft.Json.JsonProperty("freight", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public NewSalesOrderFreightDto Freight { get; set; } + + /// + /// The branch with which this order is associated. Prio for setting the Branch ID being: + ///
<list type="number"><item>BranchID set in body</item><item>BranchID from call header</item><item>BranchID from customer location</item><item>Company's default branch ID</item></list> + ///
+ [Newtonsoft.Json.JsonProperty("branchId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(30)] + public string BranchId { get; set; } + + /// + /// Sets the type code for the original sales order + /// + [Newtonsoft.Json.JsonProperty("originalOrderType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(2)] + public string OriginalOrderType { get; set; } + + /// + /// Sets the unique identifier of the original order + /// + [Newtonsoft.Json.JsonProperty("originalOrderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(15)] + public string OriginalOrderId { get; set; } + + /// + /// Sets default sales person for the order + /// + [Newtonsoft.Json.JsonProperty("salesPersonId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(15)] + public string SalesPersonId { get; set; } + + /// + /// The project with which this sales order is associated + /// + [Newtonsoft.Json.JsonProperty("projectId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(30)] + public string ProjectId { get; set; } + } /// @@ -801,7 +924,7 @@ public partial class NewSalesOrderCommand ///
When the contact information is provided, it is expected to provide all needed fields for the contact(name, attention etc). ///
No default values from the customer will be set for the non defined contact fields. ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class NewSalesOrderContactDto { /// @@ -834,7 +957,7 @@ public partial class NewSalesOrderContactDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class NewSalesOrderCustomerDto { /// @@ -885,7 +1008,7 @@ public partial class NewSalesOrderCustomerDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class NewSalesOrderFinancialInfoDto { /// @@ -932,7 +1055,32 @@ public partial class NewSalesOrderFinancialInfoDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class NewSalesOrderFreightDto + { + /// + /// The freight cost calculated for the sales order, can be manually set if orders Ship via code allows it. + /// + [Newtonsoft.Json.JsonProperty("cost", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Cost { get; set; } + + /// + /// The additional freight charges for handling the order. + /// + [Newtonsoft.Json.JsonProperty("premiumAmount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? PremiumAmount { get; set; } + + /// + /// The tax category that applies to the freight amount. + ///
By default, it is the tax category associated with the ship via code selected for the order. + ///
+ [Newtonsoft.Json.JsonProperty("taxCategoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(10)] + public string TaxCategoryId { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class NewSalesOrderLineDto { /// @@ -1124,9 +1272,62 @@ public partial class NewSalesOrderLineDto [Newtonsoft.Json.JsonProperty("hasManualPrice", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? HasManualPrice { get; set; } + /// + /// The branch with which this line is associated. + ///
If no `BranchId` is provided, default is set from order `BranchId` + ///
+ [Newtonsoft.Json.JsonProperty("branchId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(30)] + public string BranchId { get; set; } + + /// + /// Indicates if line is comissionable. + ///
If not set, the default value is picked from the inventory item + ///
+ [Newtonsoft.Json.JsonProperty("commissionable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? Commissionable { get; set; } + + /// + /// Sets the sales person for the line. + ///
If `SalesPersonId` is provided as (null), the value will be set from from order `SalesPersonId` + ///
+ [Newtonsoft.Json.JsonProperty("salesPersonId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(15)] + public string SalesPersonId { get; set; } + + /// + /// Sets the purchase source of the line. + ///
Accepted values are `dropShip` or `purchaseToOrder`, when no value provided, the default value is picked from the inventory item. + ///
If the value was provided as '' (empty string), the value will set to null. + ///
+ [Newtonsoft.Json.JsonProperty("purchaseOrderSource", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PurchaseOrderSource { get; set; } + + /// + /// <remarks> + ///
If the actual value was provided as (null), the value will be set from the inventory item preferred supplier, + ///
can be set only if the Purchase Order Source is set to `dropShip` or `purchaseToOrder` + ///
</remarks> + ///
+ [Newtonsoft.Json.JsonProperty("supplierId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string SupplierId { get; set; } + + /// + /// Sets the supplier price for the line item. + /// + [Newtonsoft.Json.JsonProperty("supplierPrice", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? SupplierPrice { get; set; } + + /// + /// The project task with which this sales order line is associated + /// + [Newtonsoft.Json.JsonProperty("projectTaskId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(30)] + public string ProjectTaskId { get; set; } + } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class NewSalesOrderPaymentSettings { /// @@ -1151,7 +1352,7 @@ public partial class NewSalesOrderPaymentSettings } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class NewSalesOrderShippingDto { /// @@ -1223,13 +1424,34 @@ public partial class NewSalesOrderShippingDto [Newtonsoft.Json.JsonProperty("priority", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int? Priority { get; set; } + /// + /// Sets the shipping zone of the order freight + /// + [Newtonsoft.Json.JsonProperty("zoneId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(15)] + public string ZoneId { get; set; } + + /// + /// The identifier of the point (such as a city or town) where the title of goods passes from the company to the customer. + /// + [Newtonsoft.Json.JsonProperty("fobPointId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(15)] + public string FobPointId { get; set; } + + /// + /// The identifier of the shipping terms used for the order. + /// + [Newtonsoft.Json.JsonProperty("termsId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(15)] + public string TermsId { get; set; } + } /// /// Defines an address when updating a sales order. ///
Only the provided fields will be changed in address. ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class PatchSalesOrderAddressDto { /// @@ -1281,9 +1503,15 @@ public partial class PatchSalesOrderAddressDto [System.ComponentModel.DataAnnotations.StringLength(2)] public string CountryId { get; set; } + /// + /// Whether this address overrides the default address + /// + [Newtonsoft.Json.JsonProperty("overridesDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? OverridesDefault { get; set; } + } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class PatchSalesOrderBillingDto { [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -1297,7 +1525,7 @@ public partial class PatchSalesOrderBillingDto /// /// The Visma.net.ERP.SalesOrders.Api.Application.Commands.PatchSalesOrder.PatchSalesOrderCommand is a command for updating parts of a sales order /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class PatchSalesOrderCommand { /// @@ -1326,7 +1554,7 @@ public partial class PatchSalesOrderCommand public string Description { get; set; } /// - /// Sets the status code for the order. Must be "Open" or "Hold". + /// Sets the status code for the order. Must be "Open", "Hold" or "BackOrder". /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } @@ -1353,6 +1581,13 @@ public partial class PatchSalesOrderCommand [Newtonsoft.Json.JsonProperty("ownerId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string OwnerId { get; set; } + /// + /// Sets default sales person for the order + /// + [Newtonsoft.Json.JsonProperty("salesPersonId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(15)] + public string SalesPersonId { get; set; } + /// /// Sets the requested on date for the order. ///
Unless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone. @@ -1386,13 +1621,44 @@ public partial class PatchSalesOrderCommand [Newtonsoft.Json.JsonProperty("useReplacementCostForMarginAndProfit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? UseReplacementCostForMarginAndProfit { get; set; } + [Newtonsoft.Json.JsonProperty("freight", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public PatchSalesOrderFreightDto Freight { get; set; } + + /// + /// The branch with which this order is associated. + /// + [Newtonsoft.Json.JsonProperty("branchId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(30)] + public string BranchId { get; set; } + + /// + /// Sets the type code for the original sales order + /// + [Newtonsoft.Json.JsonProperty("originalOrderType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(2)] + public string OriginalOrderType { get; set; } + + /// + /// Sets the unique identifier of the original order + /// + [Newtonsoft.Json.JsonProperty("originalOrderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(15)] + public string OriginalOrderId { get; set; } + + /// + /// The project with which this sales order is associated + /// + [Newtonsoft.Json.JsonProperty("projectId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(30)] + public string ProjectId { get; set; } + } /// /// Defines an contact when updating a sales order. ///
Only the provided fields will be changed in contact. ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class PatchSalesOrderContactDto { /// @@ -1423,9 +1689,15 @@ public partial class PatchSalesOrderContactDto [System.ComponentModel.DataAnnotations.StringLength(255)] public string Email { get; set; } + /// + /// Whether this contact overrides the default contact + /// + [Newtonsoft.Json.JsonProperty("overridesDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? OverridesDefault { get; set; } + } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class PatchSalesOrderCustomerDto { /// @@ -1470,7 +1742,7 @@ public partial class PatchSalesOrderCustomerDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class PatchSalesOrderFinancialInfoDto { /// @@ -1486,14 +1758,6 @@ public partial class PatchSalesOrderFinancialInfoDto [Newtonsoft.Json.JsonProperty("invoiceDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset? InvoiceDate { get; set; } - /// - /// The reference number of the invoice generated for this order. - ///
This can be used if the numbering sequence assigned to invoices is configured for manual numbering. - ///
- [Newtonsoft.Json.JsonProperty("invoiceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.ComponentModel.DataAnnotations.StringLength(15)] - public string InvoiceId { get; set; } - /// /// The post period for the invoice. This can be used to override the financial period. Must be a valid existing financial period. /// @@ -1515,12 +1779,45 @@ public partial class PatchSalesOrderFinancialInfoDto [Newtonsoft.Json.JsonProperty("cashDiscountDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset? CashDiscountDate { get; set; } + /// + /// The reference number of the invoice generated for this order. + ///
This can be used if the numbering sequence assigned to invoices is configured for manual numbering. + ///
+ [Newtonsoft.Json.JsonProperty("invoiceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(15)] + public string InvoiceId { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class PatchSalesOrderFreightDto + { + /// + /// The freight cost calculated for the sales order, can be manually set if orders Ship via code allows it. + /// + [Newtonsoft.Json.JsonProperty("cost", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Cost { get; set; } + + /// + /// The additional freight charges for handling the order. + /// + [Newtonsoft.Json.JsonProperty("premiumAmount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? PremiumAmount { get; set; } + + /// + /// The tax category that applies to the freight amount. + ///
By default, it is the tax category associated with the ship via code selected for the order. + ///
+ [Newtonsoft.Json.JsonProperty("taxCategoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(10)] + public string TaxCategoryId { get; set; } + } /// /// The sales order line which is set to patch /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class PatchSalesOrderLineDto { /// @@ -1592,6 +1889,13 @@ public partial class PatchSalesOrderLineDto [System.ComponentModel.DataAnnotations.StringLength(10)] public string SalesAccountId { get; set; } + /// + /// The project task with which this sales order line is associated + /// + [Newtonsoft.Json.JsonProperty("projectTaskId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(30)] + public string ProjectTaskId { get; set; } + [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int? SortOrder { get; set; } @@ -1714,12 +2018,53 @@ public partial class PatchSalesOrderLineDto [Newtonsoft.Json.JsonProperty("hasManualPrice", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? HasManualPrice { get; set; } + /// + /// Sets the branch with which this line is associated. + ///
If `BranchId` is provided as (null), the value will be set from from order `BranchId` + ///
+ [Newtonsoft.Json.JsonProperty("branchId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string BranchId { get; set; } + + /// + /// Indicates if line is comissionable. + /// + [Newtonsoft.Json.JsonProperty("commissionable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? Commissionable { get; set; } + + /// + /// Sets the sales person for the line. + ///
If `SalesPersonId` is provided as (null), the value will be set from from order `SalesPersonId` + ///
+ [Newtonsoft.Json.JsonProperty("salesPersonId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(15)] + public string SalesPersonId { get; set; } + + /// + /// Sets the purchase source of the line. + ///
Accepted values are `dropShip` or `purchaseToOrder`, when null provided, value will be set from default value from the inventory item. + ///
If the value was provided as '' (empty string), the value will set to null. + ///
+ [Newtonsoft.Json.JsonProperty("purchaseOrderSource", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PurchaseOrderSource { get; set; } + + /// + /// Sets the Purchase Order Vendor for the line, can be set if the purchase order source is `purchaseToOrder` or `dropShip`. + /// + [Newtonsoft.Json.JsonProperty("supplierId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string SupplierId { get; set; } + + /// + /// Sets the supplier price for the line item. + /// + [Newtonsoft.Json.JsonProperty("supplierPrice", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? SupplierPrice { get; set; } + } /// /// The Visma.net.ERP.SalesOrders.Api.Application.Commands.PatchSalesOrderLines.PatchSalesOrderLinesCommand is a command for updating the lines of a sales order /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class PatchSalesOrderLinesCommand { /// @@ -1730,7 +2075,7 @@ public partial class PatchSalesOrderLinesCommand } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class PatchSalesOrderPaymentSettingsDto { /// @@ -1755,7 +2100,7 @@ public partial class PatchSalesOrderPaymentSettingsDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class PatchSalesOrderShippingDto { /// @@ -1829,9 +2174,29 @@ public partial class PatchSalesOrderShippingDto [Newtonsoft.Json.JsonProperty("priority", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int? Priority { get; set; } + /// + /// Sets the shipping zone of the order freight + /// + [Newtonsoft.Json.JsonProperty("zoneId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ZoneId { get; set; } + + /// + /// The identifier of the point (such as a city or town) where the title of goods passes from the company to the customer. + /// + [Newtonsoft.Json.JsonProperty("fobPointId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(15)] + public string FobPointId { get; set; } + + /// + /// The identifier of the shipping terms used for the order. + /// + [Newtonsoft.Json.JsonProperty("termsId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(15)] + public string TermsId { get; set; } + } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class ProblemDetails { [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -1849,12 +2214,12 @@ public partial class ProblemDetails [Newtonsoft.Json.JsonProperty("instance", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Instance { get; set; } - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); + private System.Collections.Generic.IDictionary _additionalProperties; [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } @@ -1863,7 +2228,7 @@ public System.Collections.Generic.IDictionary AdditionalProperti /// /// The Visma.net.ERP.SalesOrders.Api.Dto.ProjectDto class defines a project reference for a sales order /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class ProjectDto { /// @@ -1886,7 +2251,7 @@ public partial class ProjectDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SalesOrderBillingDto { [Newtonsoft.Json.JsonProperty("contact", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -1897,14 +2262,14 @@ public partial class SalesOrderBillingDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SalesOrderCommissionDto { /// /// The id of the sales person that gets the commision /// - [Newtonsoft.Json.JsonProperty("salesPersonId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int SalesPersonId { get; set; } + [Newtonsoft.Json.JsonProperty("salesPersonId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string SalesPersonId { get; set; } /// /// The commission percent @@ -1919,14 +2284,14 @@ public partial class SalesOrderCommissionDto public double? Amount { get; set; } /// - /// The order's commisionable amount + /// The order's commissionable amount /// [Newtonsoft.Json.JsonProperty("commissionableAmount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? CommissionableAmount { get; set; } } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SalesOrderCustomerDto { /// @@ -1973,7 +2338,7 @@ public partial class SalesOrderCustomerDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SalesOrderDiscountDto { /// @@ -2047,7 +2412,7 @@ public partial class SalesOrderDiscountDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SalesOrderDto { /// @@ -2062,6 +2427,9 @@ public partial class SalesOrderDto [Newtonsoft.Json.JsonProperty("orderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string OrderId { get; set; } + [Newtonsoft.Json.JsonProperty("branch", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CdDescriptionPairDto Branch { get; set; } + /// /// Description of the order /// @@ -2166,6 +2534,24 @@ public partial class SalesOrderDto [Newtonsoft.Json.JsonProperty("totals", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public SalesOrderTotalsDto Totals { get; set; } + [Newtonsoft.Json.JsonProperty("freight", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SalesOrderFreightDto Freight { get; set; } + + /// + /// The type code for the original sales order + /// + [Newtonsoft.Json.JsonProperty("originalOrderType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string OriginalOrderType { get; set; } + + /// + /// The unique identifier of the original order + /// + [Newtonsoft.Json.JsonProperty("originalOrderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string OriginalOrderId { get; set; } + + [Newtonsoft.Json.JsonProperty("salesPerson", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SalesPersonDto SalesPerson { get; set; } + /// /// An internal order version used for detecting concurrent updates to an order /// @@ -2177,7 +2563,7 @@ public partial class SalesOrderDto /// /// The Visma.net.ERP.SalesOrders.Api.Dto.SalesOrderExpansions enumeration defines individual parts of the Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDto that can be filled /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public enum SalesOrderExpansions { @@ -2208,12 +2594,15 @@ public enum SalesOrderExpansions [System.Runtime.Serialization.EnumMember(Value = @"Note")] Note = 8, + [System.Runtime.Serialization.EnumMember(Value = @"Freight")] + Freight = 9, + [System.Runtime.Serialization.EnumMember(Value = @"All")] - All = 9, + All = 10, } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SalesOrderFinancialInfoDto { /// @@ -2260,7 +2649,62 @@ public partial class SalesOrderFinancialInfoDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderFreightDto + { + [Newtonsoft.Json.JsonProperty("volume", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Volume { get; set; } + + [Newtonsoft.Json.JsonProperty("weight", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Weight { get; set; } + + /// + /// The freight cost calculated for the sales order, + /// + [Newtonsoft.Json.JsonProperty("cost", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Cost { get; set; } + + /// + /// The freight cost calculated for the sales order in base currency. + /// + [Newtonsoft.Json.JsonProperty("costInBaseCurrency", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double CostInBaseCurrency { get; set; } + + /// + /// The additional freight charges for handling the order. + /// + [Newtonsoft.Json.JsonProperty("premiumAmount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double PremiumAmount { get; set; } + + /// + /// The additional freight charges in base currency for handling the order. + /// + [Newtonsoft.Json.JsonProperty("premiumAmountInBaseCurrency", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double PremiumAmountInBaseCurrency { get; set; } + + /// + /// The amounts calculated based on the ship terms. + ///
/// + ///
+ [Newtonsoft.Json.JsonProperty("amount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Amount { get; set; } + + /// + /// The amounts calculated based on the ship terms in base currency of the order. + /// + [Newtonsoft.Json.JsonProperty("amountInBaseCurrency", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double AmountInBaseCurrency { get; set; } + + /// + /// The tax category that applies to the freight amount. + ///
By default, it is the tax category associated with the ship via code selected for the order. + ///
+ [Newtonsoft.Json.JsonProperty("taxCategoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string TaxCategoryId { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SalesOrderLineDto { /// @@ -2294,6 +2738,9 @@ public partial class SalesOrderLineDto [Newtonsoft.Json.JsonProperty("orderDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset? OrderDate { get; set; } + [Newtonsoft.Json.JsonProperty("branch", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CdDescriptionPairDto Branch { get; set; } + [Newtonsoft.Json.JsonProperty("inventory", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public SalesOrderLineInventoryDto Inventory { get; set; } @@ -2493,9 +2940,42 @@ public partial class SalesOrderLineDto [Newtonsoft.Json.JsonProperty("inventoryAlternateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string InventoryAlternateId { get; set; } + /// + /// Indicates if line has quantity left to be shipped + /// + [Newtonsoft.Json.JsonProperty("openLine", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool OpenLine { get; set; } + + /// + /// Indicates if line is comissionable + /// + [Newtonsoft.Json.JsonProperty("commissionable", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Commissionable { get; set; } + + [Newtonsoft.Json.JsonProperty("salesPerson", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SalesPersonDto SalesPerson { get; set; } + + /// + /// Information about line purchase order source + /// + [Newtonsoft.Json.JsonProperty("purchaseOrderSource", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PurchaseOrderSource { get; set; } + + [Newtonsoft.Json.JsonProperty("supplier", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SupplierDto Supplier { get; set; } + + [Newtonsoft.Json.JsonProperty("supplierPrice", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double SupplierPrice { get; set; } + + /// + /// The project task with which this sales order line is associated + /// + [Newtonsoft.Json.JsonProperty("projectTaskId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ProjectTaskId { get; set; } + } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SalesOrderLineDtoPagedResult { /// @@ -2518,7 +2998,7 @@ public partial class SalesOrderLineDtoPagedResult } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SalesOrderLineInventoryDto { /// @@ -2538,7 +3018,7 @@ public partial class SalesOrderLineInventoryDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SalesOrderListDto { /// @@ -2648,7 +3128,7 @@ public partial class SalesOrderListDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SalesOrderListDtoPagedResult { /// @@ -2671,7 +3151,7 @@ public partial class SalesOrderListDtoPagedResult } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SalesOrderOriginDto { /// @@ -2694,7 +3174,7 @@ public partial class SalesOrderOriginDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SalesOrderPaymentDto { [Newtonsoft.Json.JsonProperty("paymentMethod", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -2714,7 +3194,7 @@ public partial class SalesOrderPaymentDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SalesOrderPrintDto { /// @@ -2737,7 +3217,7 @@ public partial class SalesOrderPrintDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SalesOrderRotRutDistributionDto { /// @@ -2766,7 +3246,7 @@ public partial class SalesOrderRotRutDistributionDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SalesOrderRotRutDto { /// @@ -2807,7 +3287,75 @@ public partial class SalesOrderRotRutDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + /// + /// The Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderShipmentDto specifies a shipment line detail for a sales order + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesOrderShipmentDto + { + /// + /// The type of the shipment + /// + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + /// + /// The id of a shipments created for the order + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// The date of the shipment + /// + [Newtonsoft.Json.JsonProperty("date", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Date { get; set; } + + /// + /// The quantity of goods on the shipment + /// + [Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Quantity { get; set; } + + /// + /// The weight of the shipped goods + /// + [Newtonsoft.Json.JsonProperty("weight", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Weight { get; set; } + + /// + /// The volume of the shipped goods + /// + [Newtonsoft.Json.JsonProperty("volume", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Volume { get; set; } + + /// + /// The type of invoice + /// + [Newtonsoft.Json.JsonProperty("invoiceType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string InvoiceType { get; set; } + + /// + /// The id of the invoice + /// + [Newtonsoft.Json.JsonProperty("invoiceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string InvoiceId { get; set; } + + /// + /// The type of inventory document created for the shipment + /// + [Newtonsoft.Json.JsonProperty("inventoryDocumentType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string InventoryDocumentType { get; set; } + + /// + /// The id of the inventory document created for the shipment + /// + [Newtonsoft.Json.JsonProperty("inventoryReferenceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string InventoryReferenceId { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SalesOrderShippingDto { [Newtonsoft.Json.JsonProperty("contact", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -2879,7 +3427,7 @@ public partial class SalesOrderShippingDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SalesOrderStatusDto { /// @@ -2905,7 +3453,7 @@ public partial class SalesOrderStatusDto /// /// The Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderTaxDto specifies a tax line detail for a sales order /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SalesOrderTaxDto { /// @@ -2970,7 +3518,7 @@ public partial class SalesOrderTaxDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SalesOrderTotalsDto { /// @@ -3053,18 +3601,54 @@ public partial class SalesOrderTotalsDto [Newtonsoft.Json.JsonProperty("freightCost", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? FreightCost { get; set; } + /// + /// The freight cost calculated for the sales order in base currency. Not applicable for transfer order types. + /// + [Newtonsoft.Json.JsonProperty("freightCostInBaseCurrency", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? FreightCostInBaseCurrency { get; set; } + /// /// The freight amount calculated in accordance with the shipping terms. Not applicable for transfer order types. /// [Newtonsoft.Json.JsonProperty("freightTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double FreightTotal { get; set; } + /// + /// The freight amount calculated in accordance with the shipping terms in base currency. Not applicable for transfer order types. + /// + [Newtonsoft.Json.JsonProperty("freightTotalInBaseCurrency", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double FreightTotalInBaseCurrency { get; set; } + + /// + /// The sum of unbilled amounts for the lines + /// + [Newtonsoft.Json.JsonProperty("unbilledAmount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double UnbilledAmount { get; set; } + + /// + /// The sum of unbilled amounts for the lines in base currency + /// + [Newtonsoft.Json.JsonProperty("unbilledAmountInBaseCurrency", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double UnbilledAmountInBaseCurrency { get; set; } + + /// + /// The sum of unshipped amounts for the lines + /// + [Newtonsoft.Json.JsonProperty("unshippedAmount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double UnshippedAmount { get; set; } + + /// + /// The sum of unshipped amounts for the lines in base currency + /// + [Newtonsoft.Json.JsonProperty("unshippedAmountInBaseCurrency", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double UnshippedAmountInBaseCurrency { get; set; } + } /// /// Defines an error response for validation problems /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SalesOrderValidationProblemDetails { [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -3091,21 +3675,49 @@ public partial class SalesOrderValidationProblemDetails [Newtonsoft.Json.JsonProperty("details", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Details { get; set; } - private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); + private System.Collections.Generic.IDictionary _additionalProperties; [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { - get { return _additionalProperties; } + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } set { _additionalProperties = value; } } } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SalesPersonDto + { + /// + /// The id + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// The description + /// + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class SupplierDto + { + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + } + /// /// Defines details related to validation problems /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class ValidationErrorCodeDetails { /// @@ -3132,7 +3744,7 @@ public partial class ValidationErrorCodeDetails /// /// Warehouse information for a specific inventory item /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class WarehouseAvailabilityDto { /// @@ -3224,7 +3836,7 @@ public partial class WarehouseAvailabilityDto } - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SwaggerResponse { public int StatusCode { get; private set; } @@ -3238,7 +3850,7 @@ public SwaggerResponse(int statusCode, System.Collections.Generic.IReadOnlyDicti } } - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class SwaggerResponse : SwaggerResponse { public TResult Result { get; private set; } @@ -3251,7 +3863,7 @@ public SwaggerResponse(int statusCode, System.Collections.Generic.IReadOnlyDicti } - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class ApiException : System.Exception { public int StatusCode { get; private set; } @@ -3274,7 +3886,7 @@ public override string ToString() } } - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.15.10.0 (NJsonSchema v10.6.10.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class ApiException : ApiException { public TResult Result { get; private set; } @@ -3288,10 +3900,13 @@ public ApiException(string message, int statusCode, string response, System.Coll } -#pragma warning restore 1591 -#pragma warning restore 1573 -#pragma warning restore 472 -#pragma warning restore 114 #pragma warning restore 108 +#pragma warning restore 114 +#pragma warning restore 472 +#pragma warning restore 612 +#pragma warning restore 1573 +#pragma warning restore 1591 +#pragma warning restore 8073 #pragma warning restore 3016 -#pragma warning restore 8603 \ No newline at end of file +#pragma warning restore 8603 +#pragma warning restore 8604 \ No newline at end of file diff --git a/Visma.Net.SalesOrderNG/Visma.Net.SalesOrderNG.csproj b/Visma.Net.SalesOrderNG/Visma.Net.SalesOrderNG.csproj index cd43786..b98e5cd 100644 --- a/Visma.Net.SalesOrderNG/Visma.Net.SalesOrderNG.csproj +++ b/Visma.Net.SalesOrderNG/Visma.Net.SalesOrderNG.csproj @@ -2,11 +2,14 @@ netstandard2.0;net462;net6 + 1.0.0.1 + 1.0.0.1 + diff --git a/Visma.Net.SalesOrderNG/Visma.net.SalesOrder.nswag b/Visma.Net.SalesOrderNG/Visma.net.SalesOrder.nswag index d436259..0fe882a 100644 --- a/Visma.Net.SalesOrderNG/Visma.net.SalesOrder.nswag +++ b/Visma.Net.SalesOrderNG/Visma.net.SalesOrder.nswag @@ -3,7 +3,7 @@ "defaultVariables": null, "documentGenerator": { "fromDocument": { - "json": "{\r\n \"openapi\": \"3.0.1\",\r\n \"info\": {\r\n \"title\": \"Visma.net.ERP.SalesOrders.Api\",\r\n \"version\": \"1.0.14.388\"\r\n },\r\n \"servers\": [\r\n {\r\n \"url\": \"/\"\r\n }\r\n ],\r\n \"paths\": {\r\n \"/api/v3/Customers\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"Customers\"\r\n ],\r\n \"summary\": \"Gets a list of customers\",\r\n \"description\": \"Sample request:\\r\\n \\r\\nGET /customers?filter=visma&pageSize=10\",\r\n \"operationId\": \"Customers_GetList_\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"filter\",\r\n \"in\": \"query\",\r\n \"description\": \"An optional text string to find customers matching (searching fields id, name, gln, tax registration id). If not specified all customers are returned.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of customers retrieved per page. If not specified, the default value of 100 will be used.\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 100\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"The zero based page index to retrieve\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 0\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Returns the list of customers found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/CustomerDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/CustomerDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/CustomerDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If pageSize or pageIndex is not within the allowed range\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/Customers/{customerId}/locations\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"Customers\"\r\n ],\r\n \"summary\": \"Gets a list of locations for the specified customer\",\r\n \"description\": \"Sample rquest:\\r\\n \\r\\nGET /customers/10000/locations\",\r\n \"operationId\": \"Customers_GetCustomerLocationList_customerIdlocations\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"customerId\",\r\n \"in\": \"path\",\r\n \"description\": \"The customer id (CustomerCd) to retrieve locations for\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"List of locations for the specified customer\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationItemDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationItemDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationItemDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If customer with id customerId is not found or is not accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/Inventory\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"Inventory\"\r\n ],\r\n \"summary\": \"Gets an inventory summary for inventory items.\",\r\n \"description\": \"Sample request:\\r\\n \\r\\nGET /inventory?inventoryId=Item1\\r\\n \\r\\nGET /inventory?warehouseId=MAIN&modifiedSince=2021-08-01T12:00:00&pageSize=1000\\r\\n \\r\\nGET /inventory?inventoryId=Item1&InventoryId=Item2&expand=location,attribute\\r\\n \\r\\nGET /inventory?expand=location&attributeFilter=WEBSHOP:1\",\r\n \"operationId\": \"Inventory_GetList_\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"inventoryId\",\r\n \"in\": \"query\",\r\n \"description\": \"A list of zero or more inventory items to get a summary for. If no inventoryId is passed, all inventory items will be included in the response.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"warehouseId\",\r\n \"in\": \"query\",\r\n \"description\": \"A list of zero or more warehouses to get a summary for. If no warehouse is supplied, all warehouses will be included in the response.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"locationId\",\r\n \"in\": \"query\",\r\n \"description\": \"A list of zero or more locations to get a summary for. If no location is supplied, all locations will be included in the response.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"expand\",\r\n \"in\": \"query\",\r\n \"description\": \"An additional option to include location detail information with the warehouse summary, or attribute details for the inventory item. If this is not supplied, location information or attributes will not be included in the response.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/InventoryAvailabilityExpansions\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"modifiedSince\",\r\n \"in\": \"query\",\r\n \"description\": \"A date/time value for filtering when an inventory item's warehouse or location availability last changed\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n {\r\n \"name\": \"attributeFilter\",\r\n \"in\": \"query\",\r\n \"description\": \"One or more attribute filter values specified as attribute-id:attribute-value. For example \\\"attributeFilter=WEBSHOP:1&attributeFilter=AnotherAttribute:someValue\\\"\\r\\nIf two attributeFilter values have the same attribute-Id either one need to match.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of inventory items retrieved per page. If not specified the default pagesize is 10000 items per page\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"Gets or sets the zero based page index to get\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Returns list of inventory items found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/InventoryItemAvailabilityDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/InventoryItemAvailabilityDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/InventoryItemAvailabilityDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If modifiedSince is an invalid date, if expand contains an invalid value, or if any of the supplied attributeFilter(s) are invalid\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets information about a single sales order\",\r\n \"description\": \"The expand query parameter corresponds to sections in the Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDto.\\r\\nIf an expand value is not specified it will not be filled and returned in the response object.\\r\\n \\r\\nSample request:\\r\\n \\r\\n`GET /salesorders/SO/000100?expand=customer,payment`\",\r\n \"operationId\": \"SalesOrders_GetItemAsync_typeorderId\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"expand\",\r\n \"in\": \"query\",\r\n \"description\": \"An optional specification of what details to include about the sales order. The default value if not supplied is \\\"None\\\"\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderExpansions\"\r\n }\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDto\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDto\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDto\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"patch\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Make modifications to an existing sales order\",\r\n \"description\": \"If-Match header represents a version of Sales Order to be modified and must be included in request.\\r\\nValue of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header.\",\r\n \"operationId\": \"SalesOrders_Patch_typeorderId\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of the order to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The order number to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"requestBody\": {\r\n \"description\": \"Data to change about the sales order\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderCommand\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderCommand\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderCommand\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The order was modified successfully\"\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in command is outside the allowed range\\r\\n See #/components/x-visma-erp-error-codes for the full list of error codes.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"The order specified was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"412\": {\r\n \"description\": \"Order version does not match with If-Match header\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"428\": {\r\n \"description\": \"If-Match header was not supplied\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"409\": {\r\n \"description\": \"Conflict\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"delete\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Delete an existing sales order\",\r\n \"description\": \"Sample requests:\\r\\n \\r\\n```\\r\\nDELETE /salesorders/SO/012345\\r\\n```\",\r\n \"operationId\": \"SalesOrders_Delete_typeorderId\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of the order to delete\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The order number to delete\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The order was deleted successfully\"\r\n },\r\n \"400\": {\r\n \"description\": \"Bad Request\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Specified order was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets a paged list with sales orders of a specific type\",\r\n \"description\": \"Sample requests:\\r\\n \\r\\n`GET /salesorders/SO`\\r\\n \\r\\n`GET /salesorders/SO?customerId=10000&status=Open&pageSize=10`\\r\\n \\r\\n`GET /salesorders/SO?orderBy=created%20desc`\",\r\n \"operationId\": \"SalesOrders_GetList_type\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales orders to get.\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"customerId\",\r\n \"in\": \"query\",\r\n \"description\": \"The customer for which to retrieve orders. If omitted or empty, orders for all customers are included\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"status\",\r\n \"in\": \"query\",\r\n \"description\": \"The order status to include in the result. If omitted or empty, orders with any status are included.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"modifiedSince\",\r\n \"in\": \"query\",\r\n \"description\": \"A date/time value for filtering when a sales order last changed.\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of customers retrieved per page\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 100\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"The zero based page index to retrieve\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 0\r\n }\r\n },\r\n {\r\n \"name\": \"orderBy\",\r\n \"in\": \"query\",\r\n \"description\": \"The field to order the list by. Can be one of `created`, `lastModified`, or `orderId` followed by an optional sort direction (`asc` or `desc`), default direction is `asc` (ascending) if not present.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"filter\",\r\n \"in\": \"query\",\r\n \"description\": \"A filter for the list, applied to the orderId\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Returns a list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderListDto found.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If `pageSize` or `pageIndex` is not within the allowed range, or if an invalid `orderBy` is specified\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets a paged list with sales orders of any type\",\r\n \"description\": \"Sample requests:\\r\\n \\r\\n`GET /salesorders`\\r\\n \\r\\n`GET /salesorders?customerId=10000&status=Open&pageSize=10`\\r\\n \\r\\n`GET /salesorders?orderBy=lastModified%20asc`\",\r\n \"operationId\": \"SalesOrders_GetList_\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"customerId\",\r\n \"in\": \"query\",\r\n \"description\": \"The customer for which to retrieve orders. If omitted or empty, orders for all customers are included\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"status\",\r\n \"in\": \"query\",\r\n \"description\": \"The order status to include in the result. If omitted or empty, orders with any status are included.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"modifiedSince\",\r\n \"in\": \"query\",\r\n \"description\": \"A date/time value for filtering when a sales order last changed.\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of customers retrieved per page\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 100\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"The zero based page index to retrieve\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 0\r\n }\r\n },\r\n {\r\n \"name\": \"orderBy\",\r\n \"in\": \"query\",\r\n \"description\": \"The field to order the list by. Can be one of `created`, `lastModified`, or `orderId` followed by an optional sort direction (`asc` or `desc`), default direction is `asc` (ascending) if not present.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"filter\",\r\n \"in\": \"query\",\r\n \"description\": \"A filter for the list, applied to the orderId\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Returns a list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderListDto found.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If `pageSize` or `pageIndex` is not within the allowed range, or if an invalid `orderBy` is specified\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"post\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Adds a new sales order to the system\",\r\n \"description\": \"Sample requests:\\r\\n \\r\\n```\\r\\nPOST /salesorders\\r\\n{\\r\\n \\\"customer\\\": {\\r\\n \\\"id\\\": \\\"10001\\\",\\r\\n },\\r\\n \\\"type\\\": \\\"SO\\\"\\r\\n}\\r\\n```\\r\\n```\\r\\nPOST /salesorders\\r\\n{\\r\\n \\\"customer\\\": {\\r\\n \\\"id\\\": \\\"10000\\\",\\r\\n \\\"order\\\": \\\"some-customer-order-nbr\\\"\\r\\n },\\r\\n \\\"type\\\": \\\"SO\\\",\\r\\n \\\"description\\\": \\\"sample request order\\\",\\r\\n \\\"status\\\": \\\"Hold\\\",\\r\\n \\\"orderLines\\\": [\\r\\n {\\r\\n \\\"inventoryId\\\": \\\"StockItem1\\\",\\r\\n \\\"quantity\\\": 4,\\r\\n \\\"unitPrice\\\": 101.25\\r\\n }\\r\\n ]\\r\\n}\\r\\n```\",\r\n \"operationId\": \"SalesOrders_CreateNewItem_\",\r\n \"requestBody\": {\r\n \"description\": \"Information about the sales order to create\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderCommand\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderCommand\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderCommand\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"201\": {\r\n \"description\": \"The order was created successfully, and the Location request header contains the address to call to GET the new sales order\",\r\n \"headers\": {\r\n \"Location\": {\r\n \"description\": \"Location of the newly created resource\",\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location of the newly created resource\",\r\n \"format\": \"\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in command is not present or active, or is outside the allowed range\\r\\n See #/components/x-visma-erp-error-codes for the full list of error codes.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"409\": {\r\n \"description\": \"Conflict\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/rotrut\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets ROT/RUT information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000123/rotrut`\",\r\n \"operationId\": \"SalesOrders_GetItemRotRut_typeorderIdrotrut\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderRotRutDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderRotRutDto\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderRotRutDto\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderRotRutDto\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/commissions\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets commission information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/commissions`\",\r\n \"operationId\": \"SalesOrders_GetItemCommissions_typeorderIdcommissions\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderCommissionDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderCommissionDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderCommissionDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderCommissionDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/lines\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets sales order lines for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/lines`\",\r\n \"operationId\": \"SalesOrders_GetItemLines_typeorderIdlines\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of lines retrieved per page, defaults to 1000 if not specified\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 1000\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"The zero based page index to retrieve, defaults to 0 if not specified\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 0\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.PagedResult`1 object if sales order is found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"patch\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Make modifications to an existing sales order lines\",\r\n \"description\": \"If-Match header represents a version of Sales Order to be modified and must be included in request.\\r\\nValue of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header.\",\r\n \"operationId\": \"SalesOrders_PatchLines_typeorderIdlines\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of the order to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The order number to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"requestBody\": {\r\n \"description\": \"Data to change about the sales order lines\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderLinesCommand\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderLinesCommand\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderLinesCommand\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The order was modified successfully\"\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in command is outside the allowed range\\r\\n See #/components/x-visma-erp-error-codes for the full list of error codes.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"The order specified was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"412\": {\r\n \"description\": \"Order version does not match with If-Match header\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"428\": {\r\n \"description\": \"If-Match header was not supplied\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"delete\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Delete lines from an existing sales order\",\r\n \"description\": \"Sample requests:\\r\\n \\r\\n```\\r\\nDELETE /salesorders/SO/012345/lines?ids=1,2,3,55,78\\r\\n```\",\r\n \"operationId\": \"SalesOrders_DeleteLines_typeorderIdlines\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of the order to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The order number to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"ids\",\r\n \"in\": \"query\",\r\n \"description\": \"Lines to delete with comma seprator. Limit of line ids is 1000.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The lines were deleted successfully\"\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in ids is outside the allowed range\\r\\n See #/components/x-visma-erp-error-codes for the full list of error codes.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Specified order was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"post\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Adds new lines to a existing sales order in the system\",\r\n \"description\": \"Sample request:\\r\\n```\\r\\nPOST /salesorders/SO/123456/lines\\r\\n{\\r\\n \\\"lines\\\": [\\r\\n {\\r\\n \\\"inventoryId\\\": \\\"StockItem1\\\",\\r\\n \\\"quantity\\\": 4,\\r\\n \\\"unitPrice\\\": 101.25\\r\\n },\\r\\n {\\r\\n \\\"inventoryId\\\": \\\"StockItem2\\\",\\r\\n \\\"quantity\\\": 100,\\r\\n \\\"unitPrice\\\": 121.36\\r\\n }\\r\\n ]\\r\\n}\\r\\n```\",\r\n \"operationId\": \"SalesOrders_AddLines_typeorderIdlines\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"requestBody\": {\r\n \"description\": \"Information about the lines to create\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AddSalesOrderLinesCommand\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AddSalesOrderLinesCommand\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AddSalesOrderLinesCommand\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The order lines where created successfully, and the Location request header contains the address to call to GET the new sales order\"\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in command is not present or active, or is outside the allowed range\\r\\n Specified order was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Not Found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/lines/{lineId}\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets a specific sales order line for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/lines/1`\",\r\n \"operationId\": \"SalesOrders_GetItemLine_typeorderIdlineslineId\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"lineId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the line to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderLineDto object if sales order line is found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDto\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDto\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDto\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible\\r\\n or the line with the id lineId is not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/tax\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets tax information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/tax`\",\r\n \"operationId\": \"SalesOrders_GetItemTax_typeorderIdtax\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderTaxDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderTaxDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderTaxDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderTaxDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/discounts\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets discount details information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/discounts`\",\r\n \"operationId\": \"SalesOrders_GetItemDiscounts_typeorderIddiscounts\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDiscountDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDiscountDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDiscountDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDiscountDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"components\": {\r\n \"schemas\": {\r\n \"AddSalesOrderLinesCommand\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lines\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderLineDto\"\r\n },\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"AddressDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The address id\",\r\n \"format\": \"int32\"\r\n },\r\n \"overridesDefault\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this address overrides the default address\"\r\n },\r\n \"line1\": {\r\n \"type\": \"string\",\r\n \"description\": \"Address line 1\",\r\n \"nullable\": true\r\n },\r\n \"line2\": {\r\n \"type\": \"string\",\r\n \"description\": \"Address line 2\",\r\n \"nullable\": true\r\n },\r\n \"line3\": {\r\n \"type\": \"string\",\r\n \"description\": \"Address line 3\",\r\n \"nullable\": true\r\n },\r\n \"postalCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"The postal code\",\r\n \"nullable\": true\r\n },\r\n \"city\": {\r\n \"type\": \"string\",\r\n \"description\": \"The city\",\r\n \"nullable\": true\r\n },\r\n \"country\": {\r\n \"$ref\": \"#/components/schemas/CdNamePairDto\"\r\n },\r\n \"county\": {\r\n \"$ref\": \"#/components/schemas/CdNamePairDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CdDescriptionPairDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CdNamePairDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"The name\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"ContactDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The id of the contact\",\r\n \"format\": \"int32\"\r\n },\r\n \"overridesDefault\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this overrides the default contact\"\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"The name of the contact\",\r\n \"nullable\": true\r\n },\r\n \"attention\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any attention for the contact\",\r\n \"nullable\": true\r\n },\r\n \"email\": {\r\n \"type\": \"string\",\r\n \"description\": \"The e-mail address of the contact\",\r\n \"nullable\": true\r\n },\r\n \"phone1\": {\r\n \"type\": \"string\",\r\n \"description\": \"The phone number of the contact\",\r\n \"nullable\": true\r\n },\r\n \"phone2\": {\r\n \"type\": \"string\",\r\n \"description\": \"The secondary phone number of the contact\",\r\n \"nullable\": true\r\n },\r\n \"fax\": {\r\n \"type\": \"string\",\r\n \"description\": \"The fax number of the contact\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CustomerDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal unique id\",\r\n \"format\": \"int32\"\r\n },\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"Unique id for the customer\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"The name of the customer\",\r\n \"nullable\": true\r\n },\r\n \"currencyId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The currency Id used by the customer\",\r\n \"nullable\": true\r\n },\r\n \"customerClassId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The class of the customer\",\r\n \"nullable\": true\r\n },\r\n \"defaultLocation\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationDto\"\r\n },\r\n \"addressLine1\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's first address line\",\r\n \"nullable\": true\r\n },\r\n \"addressLine2\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's second address line\",\r\n \"nullable\": true\r\n },\r\n \"postalCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's postal code\",\r\n \"nullable\": true\r\n },\r\n \"country\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's country code\",\r\n \"nullable\": true\r\n },\r\n \"salutation\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's salutation\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's status code\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.CustomerDto class Defines a customer\"\r\n },\r\n \"CustomerDtoPagedResult\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"value\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/CustomerDto\"\r\n },\r\n \"description\": \"Gets or sets the items that are paged\",\r\n \"nullable\": true\r\n },\r\n \"nextPage\": {\r\n \"type\": \"string\",\r\n \"description\": \"Gets or sets the link to the next page with more results. If set to null then no more records are present.\",\r\n \"nullable\": true\r\n },\r\n \"totalCount\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CustomerLocationDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location id\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location description\",\r\n \"nullable\": true\r\n },\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal id of the customer location\",\r\n \"format\": \"int32\"\r\n },\r\n \"countryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The country code of the location\",\r\n \"nullable\": true\r\n },\r\n \"gln\": {\r\n \"type\": \"string\",\r\n \"description\": \"The global localization number of the location\",\r\n \"nullable\": true\r\n },\r\n \"taxRegistrationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The tax registration id of the location\",\r\n \"nullable\": true\r\n },\r\n \"corporateId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The corporate id of the location\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The site id of the location\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CustomerLocationItemDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location id\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location description\",\r\n \"nullable\": true\r\n },\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal id of the customer location\",\r\n \"format\": \"int32\"\r\n },\r\n \"countryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The country code of the location\",\r\n \"nullable\": true\r\n },\r\n \"gln\": {\r\n \"type\": \"string\",\r\n \"description\": \"The global localization number of the location\",\r\n \"nullable\": true\r\n },\r\n \"taxRegistrationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The tax registration id of the location\",\r\n \"nullable\": true\r\n },\r\n \"corporateId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The corporate id of the location\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The site id of the location\",\r\n \"nullable\": true\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/AddressDto\"\r\n },\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/ContactDto\"\r\n },\r\n \"priceClassId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Price class\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"DtoLink\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"href\": {\r\n \"type\": \"string\",\r\n \"description\": \"A link to the item in question\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"EmployeeDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The internal unique identifier of the employee\",\r\n \"nullable\": true\r\n },\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the employee\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"IdDescriptionPairDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The id\",\r\n \"format\": \"int32\"\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"InventoryAvailabilityExpansions\": {\r\n \"enum\": [\r\n \"None\",\r\n \"Location\",\r\n \"Attribute\",\r\n \"All\"\r\n ],\r\n \"type\": \"string\",\r\n \"description\": \"Defines expansion options for the inventory summary endpoint.\"\r\n },\r\n \"InventoryItemAvailabilityDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"inventoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The inventory id (InventoryCd)\",\r\n \"nullable\": true\r\n },\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The internal Id used by the system to identify the inventory item\",\r\n \"format\": \"int32\"\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description of the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"baseUnit\": {\r\n \"type\": \"string\",\r\n \"description\": \"The base unit for the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"availability\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/WarehouseAvailabilityDto\"\r\n },\r\n \"description\": \"Warehouse information for the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"attributes\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"string\"\r\n },\r\n \"description\": \"Attributes applied to the inventory item\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Inventory summary for a specific inventory item\"\r\n },\r\n \"InventoryItemAvailabilityDtoPagedResult\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"value\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/InventoryItemAvailabilityDto\"\r\n },\r\n \"description\": \"Gets or sets the items that are paged\",\r\n \"nullable\": true\r\n },\r\n \"nextPage\": {\r\n \"type\": \"string\",\r\n \"description\": \"Gets or sets the link to the next page with more results. If set to null then no more records are present.\",\r\n \"nullable\": true\r\n },\r\n \"totalCount\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"LocationAvailabilityDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalLocationId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The internal id used by the sytem for this location\",\r\n \"format\": \"int32\"\r\n },\r\n \"locationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The location id (LocationCd) for this location\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description of the location\",\r\n \"nullable\": true\r\n },\r\n \"quantityOnHand\": {\r\n \"type\": \"number\",\r\n \"description\": \"Physical quantity on-hand of items in the specific location\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityAvailable\": {\r\n \"type\": \"number\",\r\n \"description\": \"You can configure the way this estimated quantity is calculated by using availability\\r\\ncalculation rules. The available quantity may include anticipated transactions and therefore\\r\\nmay be less than or greater than the QuantityOnHand. Anticipated transactions correspond\\r\\nto the documents and transactions that have been entered in the system but not yet\\r\\nprocessed to the end.\\r\\nIn the availability calculation settings of an item class, you specify which anticipated\\r\\ntransactions affect the available quantity. Thus, the available quantity may include\\r\\ngoods on purchase orders and exclude the goods allocated for sales orders. You can use\\r\\nthe available quantity as an indicator of demand.\\r\\nNote: For quantities on warehouse location level, only quantities added specifically for the location are taken into consideration in quantityAvailable\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityNotAvailable\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity stored at locations not included in the availability calculation.\\r\\nFor each warehouse location, the 'Include in Qty. Available' check box on the\\r\\nWarehouses(IN204000) screen defines whether the quantity of items stored at this\\r\\nlocation is included in the quantity of available items.\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityAvailableForShipment\": {\r\n \"type\": \"number\",\r\n \"description\": \"Estimated quantity calculated by using the following formula: the QuantityOnHand minus the quantity on unreleased inventory\\r\\nissues, minus the quantity allocated for shipping. Thus, the QuantityAvailableForShipment can be less than the QuantityOnHand.\\r\\nNote: For quantities on warehouse location level, only quantities added specifically for the location are taken into consideration in quantityAvailableForShipment\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityPurchaseOrders\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of the inventory item included in open purchase orders.\\r\\nNote: For quantities on warehouse location level, only quantities added specifically for the location are taken into consideration\",\r\n \"format\": \"double\"\r\n },\r\n \"lastModified\": {\r\n \"type\": \"string\",\r\n \"description\": \"Date and time this entry for this location was modified\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"LocationDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines a warehouse location\"\r\n },\r\n \"NewSalesOrderAddressDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"line1\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 1\",\r\n \"nullable\": true\r\n },\r\n \"line2\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 2\",\r\n \"nullable\": true\r\n },\r\n \"line3\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 3\",\r\n \"nullable\": true\r\n },\r\n \"postalCode\": {\r\n \"maxLength\": 20,\r\n \"type\": \"string\",\r\n \"description\": \"The postal code\",\r\n \"nullable\": true\r\n },\r\n \"city\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"The city\",\r\n \"nullable\": true\r\n },\r\n \"countryId\": {\r\n \"maxLength\": 2,\r\n \"type\": \"string\",\r\n \"description\": \"The country. Required when setting the address.\",\r\n \"nullable\": true\r\n },\r\n \"stateId\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"The state\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines a new address when creating a sales order.\\r\\nWhen the address information is provided, it is expected to provide all needed fields for the address(line1, line2, countryId etc).\\r\\nNo default values from the customer will be set for the non defined address fields.\"\r\n },\r\n \"NewSalesOrderBillingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderContactDto\"\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderAddressDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderCommand\": {\r\n \"required\": [\r\n \"customer\",\r\n \"type\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the type id of an active sales order type to create\"\r\n },\r\n \"orderId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the new id that should be assigned to the new sales order.\\r\\nThis is required if the specified Visma.net.ERP.SalesOrders.Api.Application.Commands.NewSalesOrder.NewSalesOrderCommand.Type has manual numbering set up. If not it should be null or empty.\",\r\n \"nullable\": true\r\n },\r\n \"currencyId\": {\r\n \"maxLength\": 5,\r\n \"type\": \"string\",\r\n \"description\": \"Override the CurrencyId for the order. Must be a valid currency Id. If not specified, the customer's currency is used if not null. If null, company base currency is used\",\r\n \"nullable\": true\r\n },\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the order date of the order to create. If not supplied, the current date will be used\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"requestOn\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the requested on date for the order to create. If not supplied, the current date will be used\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"cancelBy\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the cancel by date for the order to create. If not supplied, the order type's days to keep will be added to the current date to determine the value of this field\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the description for the order to create\\r\\n
Note that text fields should not contain any personally identifiable or otherwise sensitive data\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the initial status code for the order. Must be null, empty or one of \\\"Open\\\" or \\\"Hold\\\". If not supplied the value will be determined by the sales order type.\",\r\n \"nullable\": true\r\n },\r\n \"customer\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderCustomerDto\"\r\n },\r\n \"print\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderPrintDto\"\r\n },\r\n \"shipping\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderShippingDto\"\r\n },\r\n \"billing\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderBillingDto\"\r\n },\r\n \"financialInformation\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderFinancialInfoDto\"\r\n },\r\n \"ownerId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the owner (employee) for the order\",\r\n \"nullable\": true\r\n },\r\n \"orderLines\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderLineDto\"\r\n },\r\n \"description\": \"The lines that are added to the order upon creation\",\r\n \"nullable\": true\r\n },\r\n \"taxZoneId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Override the TaxZoneId for the order. If not specified, the customer's location's TaxZoneId will be used\",\r\n \"nullable\": true\r\n },\r\n \"note\": {\r\n \"maxLength\": 2048,\r\n \"type\": \"string\",\r\n \"description\": \"Any note to apply to the order header.\",\r\n \"nullable\": true\r\n },\r\n \"paymentSettings\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderPaymentSettings\"\r\n },\r\n \"useReplacementCostForMarginAndProfit\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"When this option is set to `true`, the `costTotal` of the order will be calculated based on `replacementUnitCost`.\\r\\nIf option is set to `false`, the `costTotal` will be calculated based on `unitCost`\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderContactDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"name\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the full name of the contact\",\r\n \"nullable\": true\r\n },\r\n \"attention\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets any attention for the contact\",\r\n \"nullable\": true\r\n },\r\n \"phone1\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the primary phone number of the contact\",\r\n \"nullable\": true\r\n },\r\n \"email\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the e-mail address of the contact\",\r\n \"format\": \"email\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines a new contact when creating a new sales order.\\r\\nWhen the contact information is provided, it is expected to provide all needed fields for the contact(name, attention etc).\\r\\nNo default values from the customer will be set for the non defined contact fields.\"\r\n },\r\n \"NewSalesOrderCustomerDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique id of the the customer\",\r\n \"nullable\": true\r\n },\r\n \"contactId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The contact id for the customer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"order\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"The customer order text\",\r\n \"nullable\": true\r\n },\r\n \"refNo\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"The customer ref number text\",\r\n \"nullable\": true\r\n },\r\n \"locationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the location for the customer supplied to use on the order.\\r\\nMust be a valid active location for the customer supplied in Visma.net.ERP.SalesOrders.Api.Dto.NewSalesOrder.NewSalesOrderCustomerDto.Id\",\r\n \"nullable\": true\r\n },\r\n \"termsId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the terms to use for the sales order.\\r\\nMust be a valid terms identifier\",\r\n \"nullable\": true\r\n },\r\n \"gln\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique global location number of the customer\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderFinancialInfoDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"invoiceSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets if the order should be invoiced/billed separately\",\r\n \"nullable\": true\r\n },\r\n \"invoiceDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the invoice date of the invoice that will be generated for the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"invoiceId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The reference number of the invoice generated for this order.\\r\\nThis can be used if the numbering sequence assigned to invoices is configured for manual numbering.\",\r\n \"nullable\": true\r\n },\r\n \"postPeriod\": {\r\n \"maxLength\": 6,\r\n \"type\": \"string\",\r\n \"description\": \"The post period for the invoice. This can be used to override the financial period. Must be a valid existing financial period.\",\r\n \"nullable\": true\r\n },\r\n \"dueDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The due date for the invoice created for the order. Default due date is set according to the credit terms.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"cashDiscountDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date when the cash discount is available for the invoice created for the order. Default date is set based on the terms selected in the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderLineDto\": {\r\n \"required\": [\r\n \"inventoryId\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"inventoryId\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\",\r\n \"description\": \"The Inventory Id of the item to add\"\r\n },\r\n \"description\": {\r\n \"maxLength\": 256,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the description of the order line item. This will override the default description from the inventory item\\r\\n
Note that text fields should not contain any personally identifiable or otherwise sensitive data\",\r\n \"nullable\": true\r\n },\r\n \"unitOfMeasure\": {\r\n \"maxLength\": 6,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the Unit of measure for the line item. This will override the default UOM for the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"shippingRule\": {\r\n \"type\": \"string\",\r\n \"description\": \"The way the line item should be shipped. This will override the default or the one set on the order head.\\r\\n
One of the following options can be set:
CancelRemainder: The ordered quantity should be delivered in one shipmentBackOrderAllowed: The ordered quantity can be delivered in multiple shipments.ShipComplete: The ordered quantity should be delivered in one shipment.\",\r\n \"nullable\": true\r\n },\r\n \"quantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the quantity of items on the order line\",\r\n \"format\": \"double\"\r\n },\r\n \"unitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the unit cost of the product on the line. If no cost is set (null or omitted) the cost will be set\\r\\naccording to predefined rules\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"unitPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the unit price for the product on the line.\\r\\nIf no price is set(null or omitted) the price will be set according to predefined rules based on the inventoryId and the customer.\\r\\nNote that the behavior of the `unitPrice` field is affected by the `hasManualPrice` option.\\r\\nIf `hasManualPrice` is provided and set to \\\"false\\\", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"externalLink\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the external link for the line\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the warehouse the item should be shipped from. This will override the default, or the one set on the order head.\",\r\n \"nullable\": true\r\n },\r\n \"reasonCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the reason code for the line. This must be one of the selectable reason codes\",\r\n \"nullable\": true\r\n },\r\n \"taxCategoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the default tax category id (from customer's class). The value must be one of the selectable Tax Categories\",\r\n \"nullable\": true\r\n },\r\n \"undershipThreshold\": {\r\n \"maximum\": 100,\r\n \"minimum\": 0,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the undership threshold in percent. If not set, information from the inventory item is used\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"overshipThreshold\": {\r\n \"maximum\": 999,\r\n \"minimum\": 100,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the overship threshold in percent. If not set, information from the inventory item is used\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"shipDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the day the order line should be shipped, so that the customer gets it on the requested date (Ship On).\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"requestDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the date the order line is requested (Requested On)\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"salesAccountId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the Sales Account Id of the line. The value must be one of the selectable Accounts.\\r\\nIf not set, a value based on the rules is used\",\r\n \"nullable\": true\r\n },\r\n \"subaccount\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"string\"\r\n },\r\n \"description\": \"Overrides the Subaccount setup for the line.\\r\\nEach entry corresponds to a subaccount id/value pair\",\r\n \"nullable\": true\r\n },\r\n \"note\": {\r\n \"maxLength\": 2048,\r\n \"type\": \"string\",\r\n \"description\": \"Adds a text note to the sales order line.\",\r\n \"nullable\": true\r\n },\r\n \"discountCode\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the discount for the line if applicable. This must be one of the selectable discount codes.\\r\\n\\r\\nNote that the behavior of the 'discountCode' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountCode' is provided, the system will set the discountCode according to the predefined rules.\\r\\n\",\r\n \"nullable\": true\r\n },\r\n \"discountPercent\": {\r\n \"maximum\": 100,\r\n \"minimum\": -100,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the manual percentage discount for the line.\\r\\n\\r\\nNote that the behavior of the 'discountPercent' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountPercent' is provided, the system will set the discountPercent according to the predefined rules.\\r\\n\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the manual currency discount amount for the line.\\r\\n\\r\\nNote that the behavior of the 'discountAmount' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountAmount' is provided, the system will set the discountAmount according to the predefined rules.\\r\\n\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"hasManualDiscount\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that line level discount is applied manually.\\r\\n\\r\\nNote that the behavior of the fields 'discountCode', 'discountPercent' and 'discountAmount' is affected by this option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and discount field(s) is provided, the system will set the line level discounts according to the predefined rules.\\r\\n\",\r\n \"nullable\": true\r\n },\r\n \"warehouseLocationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the warehouse location that will be used for the shipment generated for the order the warehouse location Id for this line. This must be a valid location for `warehouseId` and will override the default if set.\",\r\n \"nullable\": true\r\n },\r\n \"operation\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of operation the line represents to the order. Acceptable values are 'Issue' or 'Receipt'. This must be a valid operation for sales order type.\",\r\n \"nullable\": true\r\n },\r\n \"hasManualPrice\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that the `unitPrice` in this line has been specified manually.\\r\\nIf set to \\\"false\\\", the system updates the unit price in the line according to predefined rules.\\r\\nNote that the behavior of the field `unitPrice` is affected by this option.\\r\\nIf `hasManualPrice` is provided and set to \\\"false\\\", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderPaymentSettings\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"paymentMethodId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the default payment method set on the customer. This must be a valid and active payment method id.\",\r\n \"nullable\": true\r\n },\r\n \"cashAccountId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"The cash account associated with the set payment method.\",\r\n \"nullable\": true\r\n },\r\n \"paymentReference\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the external reference number for the order. This must be set if order type requires it.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderShippingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"scheduledDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the date the shipment is scheduled for\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"shipSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether the order should be shipped separately or included in a batch segment\",\r\n \"nullable\": true\r\n },\r\n \"rule\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the shipping rule for the order\",\r\n \"nullable\": true\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderAddressDto\"\r\n },\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderContactDto\"\r\n },\r\n \"preferredWarehouseId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the default site for the customer supplied to use on the order. Must be a valid site id\",\r\n \"nullable\": true\r\n },\r\n \"intrastatTransactionTypeId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Sets the intrastat transaction type id for the sales order, if not supplied the default value from the ordertype will be used. Must be a valid intrastat transaction type id.\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"shipViaId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the unique id that represents the carrier and its service to be used for shipping the ordered goods.\",\r\n \"nullable\": true\r\n },\r\n \"residentialDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether this is residential delivery\",\r\n \"nullable\": true\r\n },\r\n \"saturdayDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether this is a saturday delivery\",\r\n \"nullable\": true\r\n },\r\n \"insurance\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether insurance applies to this shipping\",\r\n \"nullable\": true\r\n },\r\n \"priority\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Sets priority of the order\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderAddressDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"line1\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 1\",\r\n \"nullable\": true\r\n },\r\n \"line2\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 2\",\r\n \"nullable\": true\r\n },\r\n \"line3\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 3\",\r\n \"nullable\": true\r\n },\r\n \"postalCode\": {\r\n \"maxLength\": 20,\r\n \"type\": \"string\",\r\n \"description\": \"The postal code\",\r\n \"nullable\": true\r\n },\r\n \"city\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"The city\",\r\n \"nullable\": true\r\n },\r\n \"stateId\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"The state\",\r\n \"nullable\": true\r\n },\r\n \"countryId\": {\r\n \"maxLength\": 2,\r\n \"type\": \"string\",\r\n \"description\": \"The country.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines an address when updating a sales order.\\r\\nOnly the provided fields will be changed in address.\"\r\n },\r\n \"PatchSalesOrderBillingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderAddressDto\"\r\n },\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderContactDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderCommand\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the order date of the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"customer\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderCustomerDto\"\r\n },\r\n \"currencyId\": {\r\n \"maxLength\": 5,\r\n \"type\": \"string\",\r\n \"description\": \"Override the CurrencyId for the order. Must be a valid currency Id.\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Description for the order\\r\\n
Note that text fields should not contain any personally identifiable or otherwise sensitive data\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the status code for the order. Must be \\\"Open\\\" or \\\"Hold\\\".\",\r\n \"nullable\": true\r\n },\r\n \"print\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderPrintDto\"\r\n },\r\n \"cancelBy\": {\r\n \"type\": \"string\",\r\n \"description\": \"Cancel by date for the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"shipping\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderShippingDto\"\r\n },\r\n \"billing\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderBillingDto\"\r\n },\r\n \"ownerId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the owner (employee) for the order\",\r\n \"nullable\": true\r\n },\r\n \"requestOn\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the requested on date for the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"financialInformation\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderFinancialInfoDto\"\r\n },\r\n \"paymentSettings\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderPaymentSettingsDto\"\r\n },\r\n \"note\": {\r\n \"maxLength\": 2048,\r\n \"type\": \"string\",\r\n \"description\": \"Any note to apply to the order header.\",\r\n \"nullable\": true\r\n },\r\n \"taxZoneId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Override the TaxZoneId for the order\",\r\n \"nullable\": true\r\n },\r\n \"useReplacementCostForMarginAndProfit\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"When this option is set to `true`, the `costTotal` of the order will be calculated based on `replacementUnitCost`.\\r\\nIf option is set to `false`, the `costTotal` will be calculated based on `unitCost`\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Application.Commands.PatchSalesOrder.PatchSalesOrderCommand is a command for updating parts of a sales order\"\r\n },\r\n \"PatchSalesOrderContactDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"name\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the full name of the contact\",\r\n \"nullable\": true\r\n },\r\n \"attention\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets any attention for the contact\",\r\n \"nullable\": true\r\n },\r\n \"phone1\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the primary phone number of the contact\",\r\n \"nullable\": true\r\n },\r\n \"email\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the e-mail address of the contact\",\r\n \"format\": \"email\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines an contact when updating a sales order.\\r\\nOnly the provided fields will be changed in contact.\"\r\n },\r\n \"PatchSalesOrderCustomerDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique id of the the customer\",\r\n \"nullable\": true\r\n },\r\n \"refNo\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"The customer ref number text. If null or not supplied the value will not be changed\",\r\n \"nullable\": true\r\n },\r\n \"order\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"The customer order text.\",\r\n \"nullable\": true\r\n },\r\n \"contactId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The contact id for the customer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"termsId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the terms to use for the sales order.\\r\\nMust be a valid terms identifier\",\r\n \"nullable\": true\r\n },\r\n \"locationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the location for the customer supplied to use on the order.\\r\\nMust be a valid active location for the customer/>\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderFinancialInfoDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"invoiceSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets if the order should be invoiced/billed separately\",\r\n \"nullable\": true\r\n },\r\n \"invoiceDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the invoice date of the invoice that will be generated for the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"invoiceId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The reference number of the invoice generated for this order.\\r\\nThis can be used if the numbering sequence assigned to invoices is configured for manual numbering.\",\r\n \"nullable\": true\r\n },\r\n \"postPeriod\": {\r\n \"maxLength\": 6,\r\n \"type\": \"string\",\r\n \"description\": \"The post period for the invoice. This can be used to override the financial period. Must be a valid existing financial period.\",\r\n \"nullable\": true\r\n },\r\n \"dueDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The due date for the invoice created for the order. Default due date is set according to the credit terms.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"cashDiscountDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date when the cash discount is available for the invoice created for the order. Default date is set based on the terms selected in the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderLineDto\": {\r\n \"required\": [\r\n \"lineId\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lineId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The line id of the line.\",\r\n \"format\": \"int32\"\r\n },\r\n \"reasonCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"Patch the reason code for the line. This must be one of the selectable reason codes\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"maxLength\": 256,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the description of the order line item. This will override the default description from the inventory item\\r\\n
Note that text fields should not contain any personally identifiable or otherwise sensitive data\",\r\n \"nullable\": true\r\n },\r\n \"shippingRule\": {\r\n \"type\": \"string\",\r\n \"description\": \"The way the line item should be shipped.\\r\\n
One of the following options can be set:
CancelRemainder: The ordered quantity should be delivered in one shipmentBackOrderAllowed: The ordered quantity can be delivered in multiple shipments.ShipComplete: The ordered quantity should be delivered in one shipment.\",\r\n \"nullable\": true\r\n },\r\n \"unitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the unit cost of the product on the line.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"undershipThreshold\": {\r\n \"maximum\": 100,\r\n \"minimum\": 0,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the undership threshold in percent. If not set, information from the inventory item is used\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"overshipThreshold\": {\r\n \"maximum\": 999,\r\n \"minimum\": 100,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the overship threshold in percent. If not set, information from the inventory item is used\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"externalLink\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the external link for the line\",\r\n \"nullable\": true\r\n },\r\n \"note\": {\r\n \"maxLength\": 2048,\r\n \"type\": \"string\",\r\n \"description\": \"Any note to apply to the order header.\",\r\n \"nullable\": true\r\n },\r\n \"salesAccountId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the Sales Account Id of the line. The value must be one of the selectable Accounts.\\r\\nIf not set, a value based on the rules is used\",\r\n \"nullable\": true\r\n },\r\n \"sortOrder\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"shipDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the day the order line should be shipped, so that the customer gets it on the requested date (Ship On).\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"requestDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the date the order line is requested (Requested On)\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"warehouseLocationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the warehouse location that will be used for the shipment generated for the order the warehouse location Id for this line.\\r\\nThis must be a valid location for `warehouseId` and will override the default if set.\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the warehouse the item should be shipped from. This will override the default, or the one set on the order head.\",\r\n \"nullable\": true\r\n },\r\n \"subaccount\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"string\"\r\n },\r\n \"description\": \"Overrides the Subaccount setup for the line.\\r\\nEach entry corresponds to a subaccount id/value pair\",\r\n \"nullable\": true\r\n },\r\n \"hasManualDiscount\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that line level discount is applied manually.\\r\\n\\r\\nNote that the behavior of the fields 'discountCode', 'discountPercent' and 'discountAmount' is affected by this option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and discount field(s) is provided, the system will set the line level discounts according to the predefined rules.\\r\\n\",\r\n \"nullable\": true\r\n },\r\n \"discountPercent\": {\r\n \"maximum\": 100,\r\n \"minimum\": -100,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the manual percentage discount for the line.\\r\\n\\r\\nNote that the behavior of the 'discountPercent' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountPercent' is provided, the system will set the discountPercent according to the predefined rules.\\r\\n\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the manual currency discount amount for the line.\\r\\n\\r\\nNote that the behavior of the 'discountAmount' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountAmount' is provided, the system will set the discountAmount according to the predefined rules.\\r\\n\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"taxCategoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the default tax category id. The value must be one of the selectable Tax Categories\",\r\n \"nullable\": true\r\n },\r\n \"discountCode\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the discount for the line if applicable. This must be one of the selectable discount codes.\\r\\n\\r\\nNote that the behavior of the 'discountCode' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountCode' is provided, the system will set the discountCode according to the predefined rules.\\r\\n\",\r\n \"nullable\": true\r\n },\r\n \"quantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the quantity of items on the order line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"unitOfMeasure\": {\r\n \"maxLength\": 6,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the Unit of measure for the line item. This will override the default UOM for the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"unitPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the unit price for the product on the line.\\r\\nIf no price is set(null or omitted) the price will be set according to predefined rules based on the inventoryId and the customer.\\r\\nNote that the behavior of the `unitPrice` field is affected by the `hasManualPrice` option.\\r\\nIf `hasManualPrice` is provided and set to \\\"false\\\", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"operation\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of operation the line represents to the order. Acceptable values are 'Issue' or 'Receipt'. This must be a valid operation for sales order type.\",\r\n \"nullable\": true\r\n },\r\n \"hasManualPrice\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that the `unitPrice` in this line has been specified manually.\\r\\nIf set to \\\"false\\\", the system updates the unit price in the line according to predefined rules.\\r\\nNote that the behavior of the field `unitPrice` is affected by this option.\\r\\nIf `hasManualPrice` is provided and set to \\\"false\\\", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The sales order line which is set to patch\"\r\n },\r\n \"PatchSalesOrderLinesCommand\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lines\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderLineDto\"\r\n },\r\n \"description\": \"The sales order lines that are set to patch\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Application.Commands.PatchSalesOrderLines.PatchSalesOrderLinesCommand is a command for updating the lines of a sales order\"\r\n },\r\n \"PatchSalesOrderPaymentSettingsDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"paymentMethodId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the default payment method set on the customer. This must be a valid and active payment method id.\",\r\n \"nullable\": true\r\n },\r\n \"cashAccountId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"The cash account associated with the set payment method.\",\r\n \"nullable\": true\r\n },\r\n \"paymentReference\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the external reference number for the order. This must be set if order type requires it.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderShippingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"shipSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether the order should be shipped separately or included in a batch segment\",\r\n \"nullable\": true\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderAddressDto\"\r\n },\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderContactDto\"\r\n },\r\n \"preferredWarehouseId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the default site for the customer supplied to use on the order. Must be a valid site id\\r\\nIf empty string, the default site for order will be removed\",\r\n \"nullable\": true\r\n },\r\n \"rule\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the shipping rule for the order\",\r\n \"nullable\": true\r\n },\r\n \"scheduledDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the date the shipment is scheduled for\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"intrastatTransactionTypeId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Sets the intrastat transaction type id for the sales order. Must be a valid intrastat transaction type id.\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"shipViaId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the unique id that represents the carrier and its service to be used for shipping the ordered goods. Must be a valid carrier id.\\r\\nIf empty string then the value will be set to null\",\r\n \"nullable\": true\r\n },\r\n \"residentialDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether this is residential delivery\",\r\n \"nullable\": true\r\n },\r\n \"saturdayDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether this is a saturday delivery\",\r\n \"nullable\": true\r\n },\r\n \"insurance\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether insurance applies to this shipping\",\r\n \"nullable\": true\r\n },\r\n \"priority\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Sets priority of the order\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"ProblemDetails\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"title\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"detail\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"instance\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": {}\r\n },\r\n \"ProjectDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n },\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal unique identifier of the project\",\r\n \"format\": \"int32\"\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.ProjectDto class defines a project reference for a sales order\"\r\n },\r\n \"SalesOrderBillingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/ContactDto\"\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/AddressDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderCommissionDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"salesPersonId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The id of the sales person that gets the commision\",\r\n \"format\": \"int32\"\r\n },\r\n \"percent\": {\r\n \"type\": \"number\",\r\n \"description\": \"The commission percent\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"amount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The commission amount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"commissionableAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The order's commisionable amount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderCustomerDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal unique id of the customer\",\r\n \"format\": \"int32\"\r\n },\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique id of the the customer\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer name\",\r\n \"nullable\": true\r\n },\r\n \"taxZone\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"contactId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The contact id for the customer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"order\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer order text\",\r\n \"nullable\": true\r\n },\r\n \"refNo\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer ref number text\",\r\n \"nullable\": true\r\n },\r\n \"location\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderDiscountDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"manualOrderIndex\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The number of discount line set for the order\",\r\n \"format\": \"int32\"\r\n },\r\n \"skipDiscount\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the discount has been cancelled for the order and is not applicable\"\r\n },\r\n \"discountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the discount applied to the order\",\r\n \"nullable\": true\r\n },\r\n \"discountSequenceId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the discount sequence of the discount ID applied to the order\",\r\n \"nullable\": true\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of discount whose sequence was applied to the document(Group or Document)\",\r\n \"nullable\": true\r\n },\r\n \"isManual\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that the discount has been applied manually\"\r\n },\r\n \"discountableAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amount used as a base for discount calculation if the discount is based on amount.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountableQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity used as a base for discount calculation if the discount is based on quantity.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amount of the discount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountPercent\": {\r\n \"type\": \"number\",\r\n \"description\": \"The discount percent, if the discount is defined to be calculated as a percentage\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"freeItem\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"freeItemQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of the free item. Used to set the quantity for the order line generate by a free item discount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type code for the sales order\",\r\n \"nullable\": true\r\n },\r\n \"orderId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique identifier of the order\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"Description of the order\",\r\n \"nullable\": true\r\n },\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"Date the order was submitted\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"cancelBy\": {\r\n \"type\": \"string\",\r\n \"description\": \"The cancel date for the order\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"lastModified\": {\r\n \"type\": \"string\",\r\n \"description\": \"Date the order was last modified\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"requestOn\": {\r\n \"type\": \"string\",\r\n \"description\": \"Date the order was requested\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"isRotRutDeductable\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether the order is ROT/RUT deductible\"\r\n },\r\n \"orderQty\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total quantity of inventory items in the order\",\r\n \"format\": \"double\"\r\n },\r\n \"note\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any notes on the order\",\r\n \"nullable\": true\r\n },\r\n \"currencyId\": {\r\n \"type\": \"string\",\r\n \"description\": \"CurrencyId for the order.\",\r\n \"nullable\": true\r\n },\r\n \"useReplacementCostForMarginAndProfit\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"When this option is set to `true`, the `costTotal` of the order will be calculated based on `replacementUnitCost`.\\r\\nIf option is set to `false`, the `costTotal` will be calculated based on `unitCost`\",\r\n \"nullable\": true\r\n },\r\n \"createdBy\": {\r\n \"type\": \"string\",\r\n \"description\": \"The user name of the creator of the order. If the order was created by an API call this field will be null or empty.\",\r\n \"nullable\": true\r\n },\r\n \"project\": {\r\n \"$ref\": \"#/components/schemas/ProjectDto\"\r\n },\r\n \"print\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderPrintDto\"\r\n },\r\n \"billing\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderBillingDto\"\r\n },\r\n \"paymentSettings\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderPaymentDto\"\r\n },\r\n \"financialInformation\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderFinancialInfoDto\"\r\n },\r\n \"owner\": {\r\n \"$ref\": \"#/components/schemas/EmployeeDto\"\r\n },\r\n \"origin\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderOriginDto\"\r\n },\r\n \"shipping\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderShippingDto\"\r\n },\r\n \"status\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderStatusDto\"\r\n },\r\n \"customer\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderCustomerDto\"\r\n },\r\n \"totals\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderTotalsDto\"\r\n },\r\n \"version\": {\r\n \"type\": \"string\",\r\n \"description\": \"An internal order version used for detecting concurrent updates to an order\",\r\n \"format\": \"byte\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderExpansions\": {\r\n \"enum\": [\r\n \"None\",\r\n \"Billing\",\r\n \"Payment\",\r\n \"FinancialInformation\",\r\n \"Shipping\",\r\n \"Customer\",\r\n \"Owner\",\r\n \"Origin\",\r\n \"Note\",\r\n \"All\"\r\n ],\r\n \"type\": \"string\",\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.SalesOrderExpansions enumeration defines individual parts of the Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDto that can be filled\"\r\n },\r\n \"SalesOrderFinancialInfoDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"invoiceSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether the order should be invoiced separately\"\r\n },\r\n \"invoiceId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id of the invoice issued for the order\",\r\n \"nullable\": true\r\n },\r\n \"invoiceDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The invoice date\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"dueDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The due date for the invoice\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"terms\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"cashDiscountDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date for the cash discount\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"postPeriod\": {\r\n \"type\": \"string\",\r\n \"description\": \"The post period for the invoice\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderLineDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lineId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The line number of the sales order line\",\r\n \"format\": \"int32\"\r\n },\r\n \"sortOrder\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Used to apply sort order to a set of lines\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"lineType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of sales order line\",\r\n \"nullable\": true\r\n },\r\n \"operation\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of operation the line represents to the order\",\r\n \"nullable\": true\r\n },\r\n \"orderDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date the order line was added\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"inventory\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineInventoryDto\"\r\n },\r\n \"unitOfMeasure\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unit of measure (UOM) for the sales order line\",\r\n \"nullable\": true\r\n },\r\n \"quantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of unit of measure this line represents\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"baseOrderQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The base order quantity for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"unitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The unit cost of items on this order line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"unitPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"The unit price for items on this order line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any description for this order line\",\r\n \"nullable\": true\r\n },\r\n \"shippingRule\": {\r\n \"type\": \"string\",\r\n \"description\": \"The shipping rule code for this order line\",\r\n \"nullable\": true\r\n },\r\n \"completed\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this order line is completed or not\",\r\n \"nullable\": true\r\n },\r\n \"extendedPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"The extended price for this sales order line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"lineTotalBeforeDiscount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The line total before any discounts are applied\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The discount amount for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"externalLink\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any external link for this sales order line\",\r\n \"nullable\": true\r\n },\r\n \"taxCategoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The Tax Category Id applying to this order line\",\r\n \"nullable\": true\r\n },\r\n \"reasonCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"The reason code\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The Site Id for items on this line\",\r\n \"nullable\": true\r\n },\r\n \"undershipThreshold\": {\r\n \"type\": \"number\",\r\n \"description\": \"The undership threshold value (%)\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"overshipThreshold\": {\r\n \"type\": \"number\",\r\n \"description\": \"The overship threshold value (%)\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"shipDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The expected shipping date for this order line\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"requestDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The request date for this order line\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"note\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any note that has been applied to this order line\",\r\n \"nullable\": true\r\n },\r\n \"salesAccountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The general ledger account this line applies to\",\r\n \"nullable\": true\r\n },\r\n \"subaccount\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"string\"\r\n },\r\n \"description\": \"The general ledger subaccount this line applies to\",\r\n \"nullable\": true\r\n },\r\n \"openQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The open quantity for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"billedQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The billed quantity for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"quantityOnShipments\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity on shipments for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountPercent\": {\r\n \"type\": \"number\",\r\n \"description\": \"Discount percentage applied to this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"Code of discount applied to this line\",\r\n \"nullable\": true\r\n },\r\n \"hasManualDiscount\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Discount is applied manually\"\r\n },\r\n \"freeItem\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether these item(s) are free or not\"\r\n },\r\n \"warehouseLocation\": {\r\n \"$ref\": \"#/components/schemas/LocationDto\"\r\n },\r\n \"replacementUnitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The replacement unit cost of an item. This is set based on the supplier price.\\r\\nIf no supplier price found, the last price of the item's default supplier will be used.\\r\\nIf no default supplier is set, the last cost of the item will be used.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"hasManualPrice\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Unit price is applied manually\"\r\n },\r\n \"inventoryAlternateId\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderLineDtoPagedResult\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"value\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDto\"\r\n },\r\n \"description\": \"Gets or sets the items that are paged\",\r\n \"nullable\": true\r\n },\r\n \"nextPage\": {\r\n \"type\": \"string\",\r\n \"description\": \"Gets or sets the link to the next page with more results. If set to null then no more records are present.\",\r\n \"nullable\": true\r\n },\r\n \"totalCount\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderLineInventoryDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n },\r\n \"baseUnit\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderListDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"_links\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"$ref\": \"#/components/schemas/DtoLink\"\r\n },\r\n \"description\": \"Links applicable for the dto\",\r\n \"nullable\": true\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of the order\",\r\n \"nullable\": true\r\n },\r\n \"orderId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The order id (a.k.a OrderCd) for the order\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"string\",\r\n \"description\": \"The current status of the order\",\r\n \"nullable\": true\r\n },\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"The order date\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"shippingScheduledDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date shipment is scheduled\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"customerId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer Id for the order (a.k.a CustoemrCd)\",\r\n \"nullable\": true\r\n },\r\n \"customerName\": {\r\n \"type\": \"string\",\r\n \"description\": \"The name of the customer as it appears on the order\",\r\n \"nullable\": true\r\n },\r\n \"orderQty\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total number of items on the order\",\r\n \"format\": \"double\"\r\n },\r\n \"orderTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total amount on the order\",\r\n \"format\": \"double\"\r\n },\r\n \"currency\": {\r\n \"type\": \"string\",\r\n \"description\": \"The currency id for the order\",\r\n \"nullable\": true\r\n },\r\n \"location\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer location for this order\",\r\n \"nullable\": true\r\n },\r\n \"requestOn\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date the order is requested\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"customerOrder\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer order link\",\r\n \"nullable\": true\r\n },\r\n \"customerRefNo\": {\r\n \"type\": \"string\",\r\n \"description\": \"The order reference number of the customer\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any description on the order\",\r\n \"nullable\": true\r\n },\r\n \"lastModified\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date and time the order was last modified\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderListDtoPagedResult\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"value\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDto\"\r\n },\r\n \"description\": \"Gets or sets the items that are paged\",\r\n \"nullable\": true\r\n },\r\n \"nextPage\": {\r\n \"type\": \"string\",\r\n \"description\": \"Gets or sets the link to the next page with more results. If set to null then no more records are present.\",\r\n \"nullable\": true\r\n },\r\n \"totalCount\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderOriginDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"_links\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"$ref\": \"#/components/schemas/DtoLink\"\r\n },\r\n \"description\": \"Links applicable for the dto\",\r\n \"nullable\": true\r\n },\r\n \"orderType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The order type code for the origin order\",\r\n \"nullable\": true\r\n },\r\n \"orderId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique id of the origin order\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderPaymentDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"paymentMethod\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"cashAccountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The cash account to use\",\r\n \"nullable\": true\r\n },\r\n \"paymentReference\": {\r\n \"type\": \"string\",\r\n \"description\": \"The payment reference\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderPrintDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"descriptionOnInvoice\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Set to true to print description on the invoice\",\r\n \"nullable\": true\r\n },\r\n \"noteOnInternalDocuments\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Set to true to print note on internal documents\",\r\n \"nullable\": true\r\n },\r\n \"noteOnExternalDocuments\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Set to true to print note on external documents\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderRotRutDistributionDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lineId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Reference to the order line\",\r\n \"format\": \"int32\"\r\n },\r\n \"personalId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The personal id\",\r\n \"nullable\": true\r\n },\r\n \"amount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"extra\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this is extra or not\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderRotRutDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"distributedAutomatically\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether the ROT/RUT is distributed automatically\"\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of ROT/RUT\",\r\n \"nullable\": true\r\n },\r\n \"appartment\": {\r\n \"type\": \"string\",\r\n \"description\": \"The appartment reference\",\r\n \"nullable\": true\r\n },\r\n \"estate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The estate reference\",\r\n \"nullable\": true\r\n },\r\n \"organizationNumber\": {\r\n \"type\": \"string\",\r\n \"description\": \"The organization number\",\r\n \"nullable\": true\r\n },\r\n \"distribution\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderRotRutDistributionDto\"\r\n },\r\n \"description\": \"The distrinbution entries\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderShippingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/ContactDto\"\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/AddressDto\"\r\n },\r\n \"scheduledDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The shipping scheduled date\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"shipSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this order can/is shipped separately\"\r\n },\r\n \"rule\": {\r\n \"type\": \"string\",\r\n \"description\": \"The shipping rule\",\r\n \"nullable\": true\r\n },\r\n \"preferredWarehouse\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"shipVia\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"fobPoint\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"terms\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"zone\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"residentialDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this is residential delivery\"\r\n },\r\n \"saturdayDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this is a saturday delivery\"\r\n },\r\n \"insurance\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether insurance applies to this shipping\"\r\n },\r\n \"intrastatTransactionType\": {\r\n \"$ref\": \"#/components/schemas/IdDescriptionPairDto\"\r\n },\r\n \"priority\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Priority of the order\",\r\n \"format\": \"int32\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderStatusDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The status code for the order\",\r\n \"nullable\": true\r\n },\r\n \"cancelled\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this order is in a cancelled state\"\r\n },\r\n \"hold\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this order is in a held state\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderTaxDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"taxId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique tax identifier of the specific tax applied to the document\",\r\n \"nullable\": true\r\n },\r\n \"taxRate\": {\r\n \"type\": \"number\",\r\n \"description\": \"The tax rate used for the tax\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"taxableAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The calculated taxable amount for the specific tax\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"taxAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The calculated tax amount for the specific tax\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"exemptTax\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the taxable amount will be included in taxExemptTotal\"\r\n },\r\n \"includeInTaxable\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the taxable amount will be included in taxableTotal\"\r\n },\r\n \"isPendingTax\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the tax calculated is treated as a pending tax\"\r\n },\r\n \"isStatisticalTax\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the tax calculated is treated as a statistical tax\"\r\n },\r\n \"isReverseTax\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the tax is treated as a reverse tax\"\r\n },\r\n \"taxType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of tax, which can be Sales, Use, VAT or Withholding\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderTaxDto specifies a tax line detail for a sales order\"\r\n },\r\n \"SalesOrderTotalsDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"orderTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The order total\",\r\n \"format\": \"double\"\r\n },\r\n \"orderTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The order total in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"taxableTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The VAT taxable total\",\r\n \"format\": \"double\"\r\n },\r\n \"taxableTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The VAT taxable in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"taxExemptTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The VAT exempt total\",\r\n \"format\": \"double\"\r\n },\r\n \"taxExemptTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The VAT exempt total in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"taxTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The tax total\",\r\n \"format\": \"double\"\r\n },\r\n \"taxTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The tax total in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"discountTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The discount total\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The discount total in base currency\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"costTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total of the costs on the lines of the sales order. How the `costTotal` is calculated is dependent on the option `useReplacementCostForMarginAndProfit`.\\r\\nIf this option is `true` the `costTotal` will be calculated based on the `replacementUnitCost`.\\r\\nIf this option is `false`, the `costTotal` will be calculate based on `unitCost`\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"costTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total of the costs on the lines of the sales order in base currency.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"freightCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight cost calculated for the sales order. Not applicable for transfer order types.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"freightTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight amount calculated in accordance with the shipping terms. Not applicable for transfer order types.\",\r\n \"format\": \"double\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderValidationProblemDetails\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"title\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"detail\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"instance\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"errors\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"nullable\": true,\r\n \"readOnly\": true\r\n },\r\n \"details\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/ValidationErrorCodeDetails\"\r\n },\r\n \"description\": \"List with details for all the validation problems\",\r\n \"nullable\": true,\r\n \"readOnly\": true\r\n }\r\n },\r\n \"additionalProperties\": {},\r\n \"description\": \"Defines an error response for validation problems\"\r\n },\r\n \"ValidationErrorCodeDetails\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"code\": {\r\n \"type\": \"string\",\r\n \"description\": \"Error code\",\r\n \"nullable\": true,\r\n \"example\": \"0001-NullNotAllowed\"\r\n },\r\n \"message\": {\r\n \"type\": \"string\",\r\n \"description\": \"Detailed validation message\",\r\n \"nullable\": true,\r\n \"example\": \"Null value not allowed\"\r\n },\r\n \"parameters\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {},\r\n \"description\": \"Extra parameters related to the validation problem.\\r\\nIf the validation problem refers to a particular field the \\\"property\\\" element will contain the field name\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines details related to validation problems\"\r\n },\r\n \"WarehouseAvailabilityDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalWarehouseId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The internal id used by the system for the warehouse\",\r\n \"format\": \"int32\"\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id (SiteCd) of the warehouse\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description of the warehouse\",\r\n \"nullable\": true\r\n },\r\n \"quantityOnHand\": {\r\n \"type\": \"number\",\r\n \"description\": \"Physical quantity on-hand of items in the specific warehouse\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityAvailable\": {\r\n \"type\": \"number\",\r\n \"description\": \"You can configure the way this estimated quantity is calculated by using availability\\r\\ncalculation rules. The available quantity may include anticipated transactions and therefore\\r\\nmay be less than or greater than the QuantityOnHand. Anticipated transactions correspond\\r\\nto the documents and transactions that have been entered in the system but not yet\\r\\nprocessed to the end.\\r\\nIn the availability calculation settings of an item class, you specify which anticipated\\r\\ntransactions affect the available quantity. Thus, the available quantity may include\\r\\ngoods on purchase orders and exclude the goods allocated for sales orders. You can use\\r\\nthe available quantity as an indicator of demand\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityAvailableForShipment\": {\r\n \"type\": \"number\",\r\n \"description\": \"Estimated quantity calculated by using the following formula: the QuantityOnHand minus the quantity on unreleased inventory\\r\\nissues, minus the quantity allocated for shipping. Thus, the QuantityAvailableForShipment can be less than the QuantityOnHand\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityNotAvailable\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity stored at locations not included in the availability calculation.\\r\\nFor each warehouse location, the 'Include in Qty. Available' check box on the\\r\\nWarehouses(IN204000) screen defines whether the quantity of items stored at this\\r\\nlocation is included in the quantity of available items.\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityPurchaseOrders\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of the inventory item included in open purchase orders.\",\r\n \"format\": \"double\"\r\n },\r\n \"estimatedUnitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The estimated cost per unit, calculated as EstimatedTotalCost/QuantityOnHand\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"estimatedTotalCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total cost for the QuantityOnHand\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"lastModified\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date and time the entry for this warehouse was modified\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"locations\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/LocationAvailabilityDto\"\r\n },\r\n \"description\": \"List of locations in the warehouse for the specific inventory item.\\r\\nNote that this is not returned as part of the response unless expand=Location is specified with the request.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Warehouse information for a specific inventory item\"\r\n }\r\n },\r\n \"securitySchemes\": {\r\n \"oauth2\": {\r\n \"type\": \"oauth2\",\r\n \"description\": \"\",\r\n \"flows\": {\r\n \"clientCredentials\": {\r\n \"tokenUrl\": \"https://connect.visma.com/connect/token\",\r\n \"scopes\": {\r\n \"visma.net.erp.salesorder:read\": \"Read sales order data\",\r\n \"visma.net.erp.salesorder:write\": \"Create or update sales order data\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"x-visma-erp-error-codes\": [\r\n {\r\n \"code\": \"0001-NullNotAllowed\",\r\n \"description\": \"Null value not allowed\"\r\n },\r\n {\r\n \"code\": \"0001-EmptyNotAllowed\",\r\n \"description\": \"Empty value not allowed\"\r\n },\r\n {\r\n \"code\": \"0002-InvalidLength\",\r\n \"description\": \"Invalid length\"\r\n },\r\n {\r\n \"code\": \"0003-InvalidValue\",\r\n \"description\": \"Invalid value\"\r\n },\r\n {\r\n \"code\": \"0100-OutsideValidRange\",\r\n \"description\": \"Value is outside the valid range\"\r\n },\r\n {\r\n \"code\": \"0200-LineIdDoesNotExist\",\r\n \"description\": \" Line Id {0}. Line with provided Id does not exists in the order\"\r\n },\r\n {\r\n \"code\": \"1100-InvalidDiscount\",\r\n \"description\": \"Document/Group discount cannot exceed the line total\"\r\n },\r\n {\r\n \"code\": \"1101-DiscountAmountMoreThanExtPrice\",\r\n \"description\": \"Discount amount can not be greater than Extended Price\"\r\n },\r\n {\r\n \"code\": \"1102-DiscountSetupInvalid\",\r\n \"description\": \"Discount setup is not valid for discounts calculations\"\r\n },\r\n {\r\n \"code\": \"1103-DiscountNotApplicable\",\r\n \"description\": \"Discount can not be applied to line\"\r\n },\r\n {\r\n \"code\": \"1104-FreeItemNotFound\",\r\n \"description\": \"Free item specified in header discount was not found.\"\r\n },\r\n {\r\n \"code\": \"1105-InvalidDiscountCode\",\r\n \"description\": \"Invalid DiscountCode. The Discount is missing or invalid\"\r\n },\r\n {\r\n \"code\": \"1200-SubaccountSegmentInactive\",\r\n \"description\": \"Subaccount segment values inactive\"\r\n },\r\n {\r\n \"code\": \"1201-SubaccountInactive\",\r\n \"description\": \"Subaccount is not Active\"\r\n },\r\n {\r\n \"code\": \"1202-SegmentValueNotFound\",\r\n \"description\": \"Segment value for Subaccount cannot be found\"\r\n },\r\n {\r\n \"code\": \"1203-SubaccountNotFound\",\r\n \"description\": \"Could not find Subaccount segment value\"\r\n },\r\n {\r\n \"code\": \"1204-SubaccountError\",\r\n \"description\": \"Validation errors for the subaccount\"\r\n },\r\n {\r\n \"code\": \"1300-InvalidShipComplete\",\r\n \"description\": \"If require location and not require shipping then ship complete cannot be set to back order allowed\"\r\n },\r\n {\r\n \"code\": \"1400-CustomerLookupException\",\r\n \"description\": \"Exception searching customer\"\r\n },\r\n {\r\n \"code\": \"1401-MissingTermsId\",\r\n \"description\": \"TermsId cannot be empty in the order. Set a default terms on the customer or specify the terms for the order\"\r\n },\r\n {\r\n \"code\": \"1402-PaymentMethodIdNotFound\",\r\n \"description\": \"Payment method set for order can not be found\"\r\n },\r\n {\r\n \"code\": \"1403-InactivePaymentMethodId\",\r\n \"description\": \"Payment methods set for order is inactive\"\r\n },\r\n {\r\n \"code\": \"1404-InvalidPaymentMethodId\",\r\n \"description\": \"Payment method set for order can not be used in sales orders\"\r\n },\r\n {\r\n \"code\": \"1405-PaymentReferenceRequired\",\r\n \"description\": \"Payment reference not set, order type requires it\"\r\n },\r\n {\r\n \"code\": \"1406-PaymentReferenceProhibited\",\r\n \"description\": \"Order type does not allow payment reference\"\r\n },\r\n {\r\n \"code\": \"1407-InvalidCustomerStatus\",\r\n \"description\": \"Invalid Customer Status\"\r\n },\r\n {\r\n \"code\": \"1408-OverrideCurrencyIdProhibited\",\r\n \"description\": \"Currency Id can not be overridden\"\r\n },\r\n {\r\n \"code\": \"1409-PaymentMethodRequired\",\r\n \"description\": \"Payment method not set, order type requires it\"\r\n },\r\n {\r\n \"code\": \"1500-CashAccountRequired\",\r\n \"description\": \"Cash account not set, order type requires it\"\r\n },\r\n {\r\n \"code\": \"1501-CashAccountInactive\",\r\n \"description\": \"Cash account set for order is inactive\"\r\n },\r\n {\r\n \"code\": \"1502-CashAccountNotFound\",\r\n \"description\": \"Cash account set on order can not be found\"\r\n },\r\n {\r\n \"code\": \"1503-CashAccountInvalidForPaymentMethod\",\r\n \"description\": \"Cash account cannot be used with the set Payment Method\"\r\n },\r\n {\r\n \"code\": \"1600-FinancialPeriodNotFound\",\r\n \"description\": \"No financial period that matches the selected Invoice date can be found. Please change the Invoice Date, set the Financial period for the order or create Financial periods\"\r\n },\r\n {\r\n \"code\": \"1601-FinancialPeriodClosed\",\r\n \"description\": \"Financial period '{0}' is closed and cannot be set for order\"\r\n },\r\n {\r\n \"code\": \"1602-FinancialPeriodInactive\",\r\n \"description\": \"Financial period is inactive. Activate it or set another period\"\r\n },\r\n {\r\n \"code\": \"1603-FinancialPeriodNotApplicable\",\r\n \"description\": \"Post period cannot be set for this order type\"\r\n },\r\n {\r\n \"code\": \"1700-WarehouseLocationNotFound\",\r\n \"description\": \"Warehouse location is not found\"\r\n },\r\n {\r\n \"code\": \"1701-WarehouseLocationInactive\",\r\n \"description\": \"Warehouse location is inactive\"\r\n },\r\n {\r\n \"code\": \"1703-WarehouseLocationInvalid\",\r\n \"description\": \"Sales not allowed for warehouse location set for line\"\r\n },\r\n {\r\n \"code\": \"1704-InvalidOrderType\",\r\n \"description\": \"Not possible to update warehouse for line with line number {0}. Setting warehouse location is allowed only for not shippable orders.\"\r\n },\r\n {\r\n \"code\": \"1800-InvalidLineOperation\",\r\n \"description\": \"Given line operation is not accepted for this order type\"\r\n },\r\n {\r\n \"code\": \"1801-MissingReasonCode\",\r\n \"description\": \"Reason code is not set and order type requires it\"\r\n },\r\n {\r\n \"code\": \"1802-InvalidWarehouseId\",\r\n \"description\": \"Invalid Warehouse Id, or Warehouse Id not found\"\r\n },\r\n {\r\n \"code\": \"1803-UniqueInventoryIdNotFound\",\r\n \"description\": \"Cannot find unique InventoryId for inventoryId: '{0}'\"\r\n },\r\n {\r\n \"code\": \"1804-InventoryIdNotFound\",\r\n \"description\": \"InventoryId cannot be found or is invalid\"\r\n },\r\n {\r\n \"code\": \"1805-InvalidTaxCategoryId\",\r\n \"description\": \"Invalid TaxCategoryId, or TaxCategory not found\"\r\n },\r\n {\r\n \"code\": \"1806-InvalidSalesAccountId\",\r\n \"description\": \"Invalid SalesAccountId specified\"\r\n },\r\n {\r\n \"code\": \"1807-InvalidReasonCode\",\r\n \"description\": \"Invalid ReasonCode, or ReasonCode not found\"\r\n },\r\n {\r\n \"code\": \"1808-InvalidUnitOfMeasure\",\r\n \"description\": \"Invalid Unit of Measure\"\r\n },\r\n {\r\n \"code\": \"1809-InvalidQuantityForType\",\r\n \"description\": \"Quantity must be zero or positive when inventory item is not of type MiscCharge\"\r\n },\r\n {\r\n \"code\": \"1810-LineAlreadyCompleted\",\r\n \"description\": \"Line is marked as completed. Patch operation can not be done on completed lines.\"\r\n },\r\n {\r\n \"code\": \"1811-LineAlreadyShippedExternalLink\",\r\n \"description\": \"Not possible to update External Link. Update only accepted for orders, where the updated line has not been shipped\"\r\n },\r\n {\r\n \"code\": \"1812-LineAlreadyShippedSalesAccountId\",\r\n \"description\": \"Not possible to update sales account id. Update only accepted for orders, where the updated line has not been shipped\"\r\n },\r\n {\r\n \"code\": \"1813-InputLinesExceedExistingLinesCount\",\r\n \"description\": \"The number of provided lines exceed existing sales order lines\"\r\n },\r\n {\r\n \"code\": \"1814-ReasonCodePrerequisitesNotMet\",\r\n \"description\": \"The reason code prerequisites for the line does not meet expectations\"\r\n },\r\n {\r\n \"code\": \"1815-SortOrderExceedLinesCount\",\r\n \"description\": \"Cannot set higher sort order number than the number of lines\"\r\n },\r\n {\r\n \"code\": \"1816-SortOrderNbrIsNotUnique\",\r\n \"description\": \"The SortOrder number provided is not unique in your request\"\r\n },\r\n {\r\n \"code\": \"1817-LineIdIsNotUnique\",\r\n \"description\": \"The LineId provided is not unique in your request\"\r\n },\r\n {\r\n \"code\": \"1818-LineAlreadyShippedUnitCost\",\r\n \"description\": \"Not possible to update Unit cost. Update only accepted for orders, where the updated line has not been shipped\"\r\n },\r\n {\r\n \"code\": \"1819-LineAlreadyShippedShippingRule\",\r\n \"description\": \"Not possible to update Shipping rule. Update only accepted for orders, where the updated line has not been shipped\"\r\n },\r\n {\r\n \"code\": \"1820-LineIsFreeItem\",\r\n \"description\": \"Cannot change discount fields for line that is marked as free item line\"\r\n },\r\n {\r\n \"code\": \"1821-InventoryIdFreeItemNotFound\",\r\n \"description\": \"InventoryId for a free Item cannot be found or is invalid\"\r\n },\r\n {\r\n \"code\": \"1822-CanNotUpdateLineLocation\",\r\n \"description\": \"Not possible to update warehouse for line with line number {0}. Update only accepted for orders in statuses Open, On hold, Back ordered, Credit hold and where the updated line has not been shipped and line is not completed.\"\r\n },\r\n {\r\n \"code\": \"1823-DeleteLineWhichIsAlreadyShipped\",\r\n \"description\": \"Cannot delete line that has been shipped\"\r\n },\r\n {\r\n \"code\": \"1824-DeleteLineWhichIsFreeDiscountLine\",\r\n \"description\": \"Cannot delete free item line set from a discount. Please review the discount\"\r\n },\r\n {\r\n \"code\": \"1825-DeleteSalesOrderWithShippedLines\",\r\n \"description\": \"Cannot delete order containing lines that have been shipped\"\r\n },\r\n {\r\n \"code\": \"5000-InvalidAttributeFilter\",\r\n \"description\": \"Invalid attributeFilter\"\r\n },\r\n {\r\n \"code\": \"5001-InvalidAttributeName\",\r\n \"description\": \"The attribute name is invalid. Only characters, digits, or space is allowed\"\r\n }\r\n ]\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": []\r\n }\r\n ]\r\n}", + "json": "{\r\n \"openapi\": \"3.0.1\",\r\n \"info\": {\r\n \"title\": \"Visma.net.ERP.SalesOrders.Api\",\r\n \"version\": \"1.0.14.746\"\r\n },\r\n \"servers\": [\r\n {\r\n \"url\": \"/\"\r\n }\r\n ],\r\n \"paths\": {\r\n \"/api/v3/Customers/{customerId}/locations\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"Customers\"\r\n ],\r\n \"summary\": \"Gets a list of locations for the specified customer\",\r\n \"description\": \"Sample rquest:\\r\\n \\r\\nGET /customers/10000/locations\",\r\n \"operationId\": \"Customers_GetCustomerLocationList_customerIdlocations\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"customerId\",\r\n \"in\": \"path\",\r\n \"description\": \"The customer id (CustomerCd) to retrieve locations for\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"List of locations for the specified customer\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationItemDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationItemDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationItemDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If customer with id customerId is not found or is not accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/Customers\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"Customers\"\r\n ],\r\n \"summary\": \"Gets a list of customers\",\r\n \"description\": \"Sample request:\\r\\n \\r\\nGET /customers?filter=visma&pageSize=10\",\r\n \"operationId\": \"Customers_GetList_\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"filter\",\r\n \"in\": \"query\",\r\n \"description\": \"An optional text string to find customers matching (searching fields id, name, gln, tax registration id). If not specified all customers are returned.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of customers retrieved per page. If not specified, the default value of 100 will be used.\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 100\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"The zero based page index to retrieve\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 0\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Returns the list of customers found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/CustomerDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/CustomerDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/CustomerDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If pageSize or pageIndex is not within the allowed range\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/Inventory\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"Inventory\"\r\n ],\r\n \"summary\": \"Gets an inventory summary for inventory items.\",\r\n \"description\": \"Sample request:\\r\\n \\r\\nGET /inventory?inventoryId=Item1\\r\\n \\r\\nGET /inventory?warehouseId=MAIN&modifiedSince=2021-08-01T12:00:00&pageSize=1000\\r\\n \\r\\nGET /inventory?inventoryId=Item1&InventoryId=Item2&expand=location,attribute\\r\\n \\r\\nGET /inventory?expand=location&attributeFilter=WEBSHOP:1\",\r\n \"operationId\": \"Inventory_GetList_\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"inventoryId\",\r\n \"in\": \"query\",\r\n \"description\": \"A list of zero or more inventory items to get a summary for. If no inventoryId is passed, all inventory items will be included in the response.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"warehouseId\",\r\n \"in\": \"query\",\r\n \"description\": \"A list of zero or more warehouses to get a summary for. If no warehouse is supplied, all warehouses will be included in the response.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"locationId\",\r\n \"in\": \"query\",\r\n \"description\": \"A list of zero or more locations to get a summary for. If no location is supplied, all locations will be included in the response.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"expand\",\r\n \"in\": \"query\",\r\n \"description\": \"An additional option to include location detail information with the warehouse summary, or attribute details for the inventory item. If this is not supplied, location information or attributes will not be included in the response.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/InventoryAvailabilityExpansions\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"modifiedSince\",\r\n \"in\": \"query\",\r\n \"description\": \"A date/time value for filtering when an inventory item's warehouse or location availability last changed\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n {\r\n \"name\": \"attributeFilter\",\r\n \"in\": \"query\",\r\n \"description\": \"One or more attribute filter values specified as attribute-id:attribute-value. For example \\\"attributeFilter=WEBSHOP:1&attributeFilter=AnotherAttribute:someValue\\\"\\r\\nIf two attributeFilter values have the same attribute-Id either one need to match.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of inventory items retrieved per page. If not specified the default pagesize is 10000 items per page\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"Gets or sets the zero based page index to get\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Returns list of inventory items found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/InventoryItemAvailabilityDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/InventoryItemAvailabilityDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/InventoryItemAvailabilityDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If modifiedSince is an invalid date, if expand contains an invalid value, or if any of the supplied attributeFilter(s) are invalid\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets information about a single sales order\",\r\n \"description\": \"The expand query parameter corresponds to sections in the Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDto.\\r\\nIf an expand value is not specified it will not be filled and returned in the response object.\\r\\n \\r\\nSample request:\\r\\n \\r\\n`GET /salesorders/SO/000100?expand=customer,payment`\",\r\n \"operationId\": \"SalesOrders_GetItemAsync_typeorderId\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"expand\",\r\n \"in\": \"query\",\r\n \"description\": \"An optional specification of what details to include about the sales order. The default value if not supplied is \\\"None\\\"\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderExpansions\"\r\n }\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDto\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDto\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDto\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"patch\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Make modifications to an existing sales order\",\r\n \"description\": \"If-Match header represents a version of Sales Order to be modified and must be included in request.\\r\\nValue of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header.\",\r\n \"operationId\": \"SalesOrders_Patch_typeorderId\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of the order to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The order number to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"requestBody\": {\r\n \"description\": \"Data to change about the sales order\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderCommand\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderCommand\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderCommand\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The order was modified successfully\"\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in command is outside the allowed range\\r\\n See #/components/x-visma-erp-error-codes for the full list of error codes.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"The order specified was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"412\": {\r\n \"description\": \"Order version does not match with If-Match header\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"428\": {\r\n \"description\": \"If-Match header was not supplied\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"409\": {\r\n \"description\": \"Conflict\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"delete\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Delete an existing sales order\",\r\n \"description\": \"If-Match header represents a version of Sales Order to be modified and must be included in request.\\r\\nValue of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header.\",\r\n \"operationId\": \"SalesOrders_Delete_typeorderId\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of the order to delete\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The order number to delete\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The order was deleted successfully\"\r\n },\r\n \"400\": {\r\n \"description\": \"Bad Request\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Specified order was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets a paged list with sales orders of a specific type\",\r\n \"description\": \"Sample requests:\\r\\n \\r\\n`GET /salesorders/SO`\\r\\n \\r\\n`GET /salesorders/SO?customerId=10000&status=Open&pageSize=10`\\r\\n \\r\\n`GET /salesorders/SO?orderBy=created%20desc`\",\r\n \"operationId\": \"SalesOrders_GetList_type\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales orders to get.\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"customerId\",\r\n \"in\": \"query\",\r\n \"description\": \"The customer for which to retrieve orders. If omitted or empty, orders for all customers are included\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"status\",\r\n \"in\": \"query\",\r\n \"description\": \"The order status to include in the result. If omitted or empty, orders with any status are included.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"modifiedSince\",\r\n \"in\": \"query\",\r\n \"description\": \"A date/time value for filtering when a sales order last changed.\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of customers retrieved per page\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 100\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"The zero based page index to retrieve\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 0\r\n }\r\n },\r\n {\r\n \"name\": \"orderBy\",\r\n \"in\": \"query\",\r\n \"description\": \"The field to order the list by. Can be one of `created`, `lastModified`, or `orderId` followed by an optional sort direction (`asc` or `desc`), default direction is `asc` (ascending) if not present.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"filter\",\r\n \"in\": \"query\",\r\n \"description\": \"A filter for the list, applied to the orderId\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Returns a list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderListDto found.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If `pageSize` or `pageIndex` is not within the allowed range, or if an invalid `orderBy` is specified\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets a paged list with sales orders of any type\",\r\n \"description\": \"Sample requests:\\r\\n \\r\\n`GET /salesorders`\\r\\n \\r\\n`GET /salesorders?customerId=10000&status=Open&pageSize=10`\\r\\n \\r\\n`GET /salesorders?orderBy=lastModified%20asc`\",\r\n \"operationId\": \"SalesOrders_GetList_\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"customerId\",\r\n \"in\": \"query\",\r\n \"description\": \"The customer for which to retrieve orders. If omitted or empty, orders for all customers are included\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"status\",\r\n \"in\": \"query\",\r\n \"description\": \"The order status to include in the result. If omitted or empty, orders with any status are included.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"modifiedSince\",\r\n \"in\": \"query\",\r\n \"description\": \"A date/time value for filtering when a sales order last changed.\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of customers retrieved per page\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 100\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"The zero based page index to retrieve\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 0\r\n }\r\n },\r\n {\r\n \"name\": \"orderBy\",\r\n \"in\": \"query\",\r\n \"description\": \"The field to order the list by. Can be one of `created`, `lastModified`, or `orderId` followed by an optional sort direction (`asc` or `desc`), default direction is `asc` (ascending) if not present.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"filter\",\r\n \"in\": \"query\",\r\n \"description\": \"A filter for the list, applied to the orderId\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Returns a list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderListDto found.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If `pageSize` or `pageIndex` is not within the allowed range, or if an invalid `orderBy` is specified\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"post\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Adds a new sales order to the system\",\r\n \"description\": \"Sample requests:\\r\\n \\r\\n```\\r\\nPOST /salesorders\\r\\n{\\r\\n \\\"customer\\\": {\\r\\n \\\"id\\\": \\\"10001\\\",\\r\\n },\\r\\n \\\"type\\\": \\\"SO\\\"\\r\\n}\\r\\n```\\r\\n```\\r\\nPOST /salesorders\\r\\n{\\r\\n \\\"customer\\\": {\\r\\n \\\"id\\\": \\\"10000\\\",\\r\\n \\\"order\\\": \\\"some-customer-order-nbr\\\"\\r\\n },\\r\\n \\\"type\\\": \\\"SO\\\",\\r\\n \\\"description\\\": \\\"sample request order\\\",\\r\\n \\\"status\\\": \\\"Hold\\\",\\r\\n \\\"orderLines\\\": [\\r\\n {\\r\\n \\\"inventoryId\\\": \\\"StockItem1\\\",\\r\\n \\\"quantity\\\": 4,\\r\\n \\\"unitPrice\\\": 101.25\\r\\n }\\r\\n ]\\r\\n}\\r\\n```\",\r\n \"operationId\": \"SalesOrders_CreateNewItem_\",\r\n \"requestBody\": {\r\n \"description\": \"Information about the sales order to create\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderCommand\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderCommand\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderCommand\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"201\": {\r\n \"description\": \"The order was created successfully, and the Location request header contains the address to call to GET the new sales order\",\r\n \"headers\": {\r\n \"Location\": {\r\n \"description\": \"Location of the newly created resource\",\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location of the newly created resource\",\r\n \"format\": \"\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in command is not present or active, or is outside the allowed range\\r\\n See #/components/x-visma-erp-error-codes for the full list of error codes.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"409\": {\r\n \"description\": \"Conflict\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/rotrut\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets ROT/RUT information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000123/rotrut`\",\r\n \"operationId\": \"SalesOrders_GetItemRotRut_typeorderIdrotrut\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderRotRutDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderRotRutDto\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderRotRutDto\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderRotRutDto\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/commissions\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets commission information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/commissions`\",\r\n \"operationId\": \"SalesOrders_GetItemCommissions_typeorderIdcommissions\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderCommissionDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderCommissionDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderCommissionDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderCommissionDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/lines\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets sales order lines for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/lines`\",\r\n \"operationId\": \"SalesOrders_GetItemLines_typeorderIdlines\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of lines retrieved per page, defaults to 1000 if not specified\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 1000\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"The zero based page index to retrieve, defaults to 0 if not specified\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 0\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.PagedResult`1 object if sales order is found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"patch\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Make modifications to an existing sales order lines\",\r\n \"description\": \"If-Match header represents a version of Sales Order to be modified and must be included in request.\\r\\nValue of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header.\",\r\n \"operationId\": \"SalesOrders_PatchLines_typeorderIdlines\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of the order to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The order number to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"requestBody\": {\r\n \"description\": \"Data to change about the sales order lines\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderLinesCommand\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderLinesCommand\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderLinesCommand\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The order was modified successfully\"\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in command is outside the allowed range\\r\\n See #/components/x-visma-erp-error-codes for the full list of error codes.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"The order specified was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"412\": {\r\n \"description\": \"Order version does not match with If-Match header\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"428\": {\r\n \"description\": \"If-Match header was not supplied\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"delete\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Delete lines from an existing sales order\",\r\n \"description\": \"If-Match header represents a version of Sales Order to be modified and must be included in request.\\r\\nValue of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header.\",\r\n \"operationId\": \"SalesOrders_DeleteLines_typeorderIdlines\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of the order to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The order number to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"ids\",\r\n \"in\": \"query\",\r\n \"description\": \"Lines to delete with comma seprator. Limit of line ids is 1000.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The lines were deleted successfully\"\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in ids is outside the allowed range\\r\\n See #/components/x-visma-erp-error-codes for the full list of error codes.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Specified order was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"post\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Adds new lines to a existing sales order in the system\",\r\n \"description\": \"If-Match header represents a version of Sales Order to be modified and must be included in request.\\r\\nValue of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header.\",\r\n \"operationId\": \"SalesOrders_AddLines_typeorderIdlines\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"requestBody\": {\r\n \"description\": \"Information about the lines to create\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AddSalesOrderLinesCommand\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AddSalesOrderLinesCommand\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AddSalesOrderLinesCommand\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The order lines where created successfully, and the Location request header contains the address to call to GET the new sales order\"\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in command is not present or active, or is outside the allowed range\\r\\n Specified order was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Not Found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/lines/{lineId}\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets a specific sales order line for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/lines/1`\",\r\n \"operationId\": \"SalesOrders_GetItemLine_typeorderIdlineslineId\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"lineId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the line to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderLineDto object if sales order line is found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDto\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDto\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDto\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible\\r\\n or the line with the id lineId is not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/tax\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets tax information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/tax`\",\r\n \"operationId\": \"SalesOrders_GetItemTax_typeorderIdtax\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderTaxDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderTaxDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderTaxDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderTaxDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/shipment\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets shipment information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/shipment`\",\r\n \"operationId\": \"SalesOrders_GetSalesOrderShipment_typeorderIdshipment\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderShipmentDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderShipmentDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderShipmentDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderShipmentDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/discounts\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets discount details information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/discounts`\",\r\n \"operationId\": \"SalesOrders_GetItemDiscounts_typeorderIddiscounts\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDiscountDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDiscountDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDiscountDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDiscountDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"components\": {\r\n \"schemas\": {\r\n \"AddSalesOrderLinesCommand\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lines\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderLineDto\"\r\n },\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"AddressDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The address id\",\r\n \"format\": \"int32\"\r\n },\r\n \"overridesDefault\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this address overrides the default address\"\r\n },\r\n \"line1\": {\r\n \"type\": \"string\",\r\n \"description\": \"Address line 1\",\r\n \"nullable\": true\r\n },\r\n \"line2\": {\r\n \"type\": \"string\",\r\n \"description\": \"Address line 2\",\r\n \"nullable\": true\r\n },\r\n \"line3\": {\r\n \"type\": \"string\",\r\n \"description\": \"Address line 3\",\r\n \"nullable\": true\r\n },\r\n \"postalCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"The postal code\",\r\n \"nullable\": true\r\n },\r\n \"city\": {\r\n \"type\": \"string\",\r\n \"description\": \"The city\",\r\n \"nullable\": true\r\n },\r\n \"country\": {\r\n \"$ref\": \"#/components/schemas/CdNamePairDto\"\r\n },\r\n \"county\": {\r\n \"$ref\": \"#/components/schemas/CdNamePairDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CdDescriptionPairDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CdNamePairDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"The name\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"ContactDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The id of the contact\",\r\n \"format\": \"int32\"\r\n },\r\n \"overridesDefault\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this overrides the default contact\"\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"The name of the contact\",\r\n \"nullable\": true\r\n },\r\n \"attention\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any attention for the contact\",\r\n \"nullable\": true\r\n },\r\n \"email\": {\r\n \"type\": \"string\",\r\n \"description\": \"The e-mail address of the contact\",\r\n \"nullable\": true\r\n },\r\n \"phone1\": {\r\n \"type\": \"string\",\r\n \"description\": \"The phone number of the contact\",\r\n \"nullable\": true\r\n },\r\n \"phone2\": {\r\n \"type\": \"string\",\r\n \"description\": \"The secondary phone number of the contact\",\r\n \"nullable\": true\r\n },\r\n \"fax\": {\r\n \"type\": \"string\",\r\n \"description\": \"The fax number of the contact\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CustomerDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal unique id\",\r\n \"format\": \"int32\"\r\n },\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"Unique id for the customer\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"The name of the customer\",\r\n \"nullable\": true\r\n },\r\n \"currencyId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The currency Id used by the customer\",\r\n \"nullable\": true\r\n },\r\n \"customerClassId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The class of the customer\",\r\n \"nullable\": true\r\n },\r\n \"defaultLocation\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationDto\"\r\n },\r\n \"addressLine1\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's first address line\",\r\n \"nullable\": true\r\n },\r\n \"addressLine2\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's second address line\",\r\n \"nullable\": true\r\n },\r\n \"postalCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's postal code\",\r\n \"nullable\": true\r\n },\r\n \"country\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's country code\",\r\n \"nullable\": true\r\n },\r\n \"salutation\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's salutation\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's status code\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.CustomerDto class Defines a customer\"\r\n },\r\n \"CustomerDtoPagedResult\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"value\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/CustomerDto\"\r\n },\r\n \"description\": \"Gets or sets the items that are paged\",\r\n \"nullable\": true\r\n },\r\n \"nextPage\": {\r\n \"type\": \"string\",\r\n \"description\": \"Gets or sets the link to the next page with more results. If set to null then no more records are present.\",\r\n \"nullable\": true\r\n },\r\n \"totalCount\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CustomerLocationDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location id\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location description\",\r\n \"nullable\": true\r\n },\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal id of the customer location\",\r\n \"format\": \"int32\"\r\n },\r\n \"countryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The country code of the location\",\r\n \"nullable\": true\r\n },\r\n \"gln\": {\r\n \"type\": \"string\",\r\n \"description\": \"The global localization number of the location\",\r\n \"nullable\": true\r\n },\r\n \"taxRegistrationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The tax registration id of the location\",\r\n \"nullable\": true\r\n },\r\n \"corporateId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The corporate id of the location\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The site id of the location\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CustomerLocationItemDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location id\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location description\",\r\n \"nullable\": true\r\n },\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal id of the customer location\",\r\n \"format\": \"int32\"\r\n },\r\n \"countryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The country code of the location\",\r\n \"nullable\": true\r\n },\r\n \"gln\": {\r\n \"type\": \"string\",\r\n \"description\": \"The global localization number of the location\",\r\n \"nullable\": true\r\n },\r\n \"taxRegistrationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The tax registration id of the location\",\r\n \"nullable\": true\r\n },\r\n \"corporateId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The corporate id of the location\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The site id of the location\",\r\n \"nullable\": true\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/AddressDto\"\r\n },\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/ContactDto\"\r\n },\r\n \"priceClassId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Price class\",\r\n \"nullable\": true\r\n },\r\n \"fobPointId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Default FobPointId\",\r\n \"nullable\": true\r\n },\r\n \"shipTermsId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Default ShipTermsId\",\r\n \"nullable\": true\r\n },\r\n \"shipZoneId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Default ShipZoneId\",\r\n \"nullable\": true\r\n },\r\n \"shipViaId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The ship via id that represents the carrier and its service to be used for shipping the ordered goods\",\r\n \"nullable\": true\r\n },\r\n \"resedentialDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Default ResidentialDelivery.
\\r\\nThis field will be removed with due date 1.12.2023. It is recommended to use ResidentialDelivery instead.\",\r\n \"deprecated\": true\r\n },\r\n \"residentialDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Default ResidentialDelivery\"\r\n },\r\n \"saturdayDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Default SaturdayDelivery\"\r\n },\r\n \"insurance\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Default Insurance\"\r\n },\r\n \"priority\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Default Priority\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"shippingRule\": {\r\n \"type\": \"string\",\r\n \"description\": \"Shipping rule of the customer set default for the order\\r\\n
Is one of the following options:
CancelRemainder: The ordered quantity should be delivered in one shipmentBackOrderAllowed: The ordered quantity can be delivered in multiple shipments.ShipComplete: The ordered quantity should be delivered in one shipment.\",\r\n \"nullable\": true\r\n },\r\n \"preferredWarehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The preferred shipping warehouse of the customer set default for the order\",\r\n \"nullable\": true\r\n },\r\n \"leadTime\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The number of days required for the shipped goods to reach the customer.\\r\\nUsed in the calculation of the scheduled shipment date\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"taxZoneId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The location tax/VAT zone id\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"DtoLink\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"href\": {\r\n \"type\": \"string\",\r\n \"description\": \"A link to the item in question\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"EmployeeDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The internal unique identifier of the employee\",\r\n \"nullable\": true\r\n },\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the employee\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"IdDescriptionPairDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The id\",\r\n \"format\": \"int32\"\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"InventoryAvailabilityExpansions\": {\r\n \"enum\": [\r\n \"None\",\r\n \"Location\",\r\n \"Attribute\",\r\n \"All\"\r\n ],\r\n \"type\": \"string\",\r\n \"description\": \"Defines expansion options for the inventory summary endpoint.\"\r\n },\r\n \"InventoryItemAvailabilityDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"inventoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The inventory id (InventoryCd)\",\r\n \"nullable\": true\r\n },\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The internal Id used by the system to identify the inventory item\",\r\n \"format\": \"int32\"\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description of the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"baseUnit\": {\r\n \"type\": \"string\",\r\n \"description\": \"The base unit for the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"availability\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/WarehouseAvailabilityDto\"\r\n },\r\n \"description\": \"Warehouse information for the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"attributes\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"string\"\r\n },\r\n \"description\": \"Attributes applied to the inventory item\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Inventory summary for a specific inventory item\"\r\n },\r\n \"InventoryItemAvailabilityDtoPagedResult\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"value\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/InventoryItemAvailabilityDto\"\r\n },\r\n \"description\": \"Gets or sets the items that are paged\",\r\n \"nullable\": true\r\n },\r\n \"nextPage\": {\r\n \"type\": \"string\",\r\n \"description\": \"Gets or sets the link to the next page with more results. If set to null then no more records are present.\",\r\n \"nullable\": true\r\n },\r\n \"totalCount\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"LocationAvailabilityDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalLocationId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The internal id used by the sytem for this location\",\r\n \"format\": \"int32\"\r\n },\r\n \"locationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The location id (LocationCd) for this location\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description of the location\",\r\n \"nullable\": true\r\n },\r\n \"quantityOnHand\": {\r\n \"type\": \"number\",\r\n \"description\": \"Physical quantity on-hand of items in the specific location\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityAvailable\": {\r\n \"type\": \"number\",\r\n \"description\": \"You can configure the way this estimated quantity is calculated by using availability\\r\\ncalculation rules. The available quantity may include anticipated transactions and therefore\\r\\nmay be less than or greater than the QuantityOnHand. Anticipated transactions correspond\\r\\nto the documents and transactions that have been entered in the system but not yet\\r\\nprocessed to the end.\\r\\nIn the availability calculation settings of an item class, you specify which anticipated\\r\\ntransactions affect the available quantity. Thus, the available quantity may include\\r\\ngoods on purchase orders and exclude the goods allocated for sales orders. You can use\\r\\nthe available quantity as an indicator of demand.\\r\\nNote: For quantities on warehouse location level, only quantities added specifically for the location are taken into consideration in quantityAvailable\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityNotAvailable\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity stored at locations not included in the availability calculation.\\r\\nFor each warehouse location, the 'Include in Qty. Available' check box on the\\r\\nWarehouses(IN204000) screen defines whether the quantity of items stored at this\\r\\nlocation is included in the quantity of available items.\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityAvailableForShipment\": {\r\n \"type\": \"number\",\r\n \"description\": \"Estimated quantity calculated by using the following formula: the QuantityOnHand minus the quantity on unreleased inventory\\r\\nissues, minus the quantity allocated for shipping. Thus, the QuantityAvailableForShipment can be less than the QuantityOnHand.\\r\\nNote: For quantities on warehouse location level, only quantities added specifically for the location are taken into consideration in quantityAvailableForShipment\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityPurchaseOrders\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of the inventory item included in open purchase orders.\\r\\nNote: For quantities on warehouse location level, only quantities added specifically for the location are taken into consideration\",\r\n \"format\": \"double\"\r\n },\r\n \"lastModified\": {\r\n \"type\": \"string\",\r\n \"description\": \"Date and time this entry for this location was modified\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"LocationDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines a warehouse location\"\r\n },\r\n \"NewSalesOrderAddressDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"line1\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 1\",\r\n \"nullable\": true\r\n },\r\n \"line2\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 2\",\r\n \"nullable\": true\r\n },\r\n \"line3\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 3\",\r\n \"nullable\": true\r\n },\r\n \"postalCode\": {\r\n \"maxLength\": 20,\r\n \"type\": \"string\",\r\n \"description\": \"The postal code\",\r\n \"nullable\": true\r\n },\r\n \"city\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"The city\",\r\n \"nullable\": true\r\n },\r\n \"countryId\": {\r\n \"maxLength\": 2,\r\n \"type\": \"string\",\r\n \"description\": \"The country. Required when setting the address.\",\r\n \"nullable\": true\r\n },\r\n \"stateId\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"The state\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines a new address when creating a sales order.\\r\\nWhen the address information is provided, it is expected to provide all needed fields for the address(line1, line2, countryId etc).\\r\\nNo default values from the customer will be set for the non defined address fields.\"\r\n },\r\n \"NewSalesOrderBillingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderContactDto\"\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderAddressDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderCommand\": {\r\n \"required\": [\r\n \"customer\",\r\n \"type\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the type id of an active sales order type to create\"\r\n },\r\n \"orderId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the new id that should be assigned to the new sales order.\\r\\nThis is required if the specified Visma.net.ERP.SalesOrders.Api.Application.Commands.NewSalesOrder.NewSalesOrderCommand.Type has manual numbering set up. If not it should be null or empty.\",\r\n \"nullable\": true\r\n },\r\n \"currencyId\": {\r\n \"maxLength\": 5,\r\n \"type\": \"string\",\r\n \"description\": \"Override the CurrencyId for the order. Must be a valid currency Id. If not specified, the customer's currency is used if not null. If null, company base currency is used\",\r\n \"nullable\": true\r\n },\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the order date of the order to create. If not supplied, the current date will be used\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"requestOn\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the requested on date for the order to create. If not supplied, the current date will be used\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"cancelBy\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the cancel by date for the order to create. If not supplied, the order type's days to keep will be added to the current date to determine the value of this field\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the description for the order to create\\r\\n
Note that text fields should not contain any personally identifiable or otherwise sensitive data\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the initial status code for the order. Must be null, empty or one of \\\"Open\\\" or \\\"Hold\\\". If not supplied the value will be determined by the sales order type.\",\r\n \"nullable\": true\r\n },\r\n \"customer\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderCustomerDto\"\r\n },\r\n \"print\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderPrintDto\"\r\n },\r\n \"shipping\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderShippingDto\"\r\n },\r\n \"billing\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderBillingDto\"\r\n },\r\n \"financialInformation\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderFinancialInfoDto\"\r\n },\r\n \"ownerId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the owner (employee) for the order\",\r\n \"nullable\": true\r\n },\r\n \"orderLines\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderLineDto\"\r\n },\r\n \"description\": \"The lines that are added to the order upon creation\",\r\n \"nullable\": true\r\n },\r\n \"taxZoneId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Override the TaxZoneId for the order. If not specified, the customer's location's TaxZoneId will be used\",\r\n \"nullable\": true\r\n },\r\n \"note\": {\r\n \"maxLength\": 2048,\r\n \"type\": \"string\",\r\n \"description\": \"Any note to apply to the order header.\",\r\n \"nullable\": true\r\n },\r\n \"paymentSettings\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderPaymentSettings\"\r\n },\r\n \"useReplacementCostForMarginAndProfit\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"When this option is set to `true`, the `costTotal` of the order will be calculated based on `replacementUnitCost`.\\r\\nIf option is set to `false`, the `costTotal` will be calculated based on `unitCost`\",\r\n \"nullable\": true\r\n },\r\n \"freight\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderFreightDto\"\r\n },\r\n \"branchId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"The branch with which this order is associated. Prio for setting the Branch ID being:\\r\\nBranchID set in bodyBranchID from call headerBranchID from customer locationCompany's default branch ID\",\r\n \"nullable\": true\r\n },\r\n \"originalOrderType\": {\r\n \"maxLength\": 2,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the type code for the original sales order\",\r\n \"nullable\": true\r\n },\r\n \"originalOrderId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the unique identifier of the original order\",\r\n \"nullable\": true\r\n },\r\n \"salesPersonId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets default sales person for the order\",\r\n \"nullable\": true\r\n },\r\n \"projectId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"The project with which this sales order is associated\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderContactDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"name\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the full name of the contact\",\r\n \"nullable\": true\r\n },\r\n \"attention\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets any attention for the contact\",\r\n \"nullable\": true\r\n },\r\n \"phone1\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the primary phone number of the contact\",\r\n \"nullable\": true\r\n },\r\n \"email\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the e-mail address of the contact\",\r\n \"format\": \"email\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines a new contact when creating a new sales order.\\r\\nWhen the contact information is provided, it is expected to provide all needed fields for the contact(name, attention etc).\\r\\nNo default values from the customer will be set for the non defined contact fields.\"\r\n },\r\n \"NewSalesOrderCustomerDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique id of the the customer\",\r\n \"nullable\": true\r\n },\r\n \"contactId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The contact id for the customer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"order\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"The customer order text\",\r\n \"nullable\": true\r\n },\r\n \"refNo\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"The customer ref number text\",\r\n \"nullable\": true\r\n },\r\n \"locationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the location for the customer supplied to use on the order.\\r\\nMust be a valid active location for the customer supplied in Visma.net.ERP.SalesOrders.Api.Dto.NewSalesOrder.NewSalesOrderCustomerDto.Id\",\r\n \"nullable\": true\r\n },\r\n \"termsId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the terms to use for the sales order.\\r\\nMust be a valid terms identifier\",\r\n \"nullable\": true\r\n },\r\n \"gln\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique global location number of the customer\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderFinancialInfoDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"invoiceSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets if the order should be invoiced/billed separately\",\r\n \"nullable\": true\r\n },\r\n \"invoiceDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the invoice date of the invoice that will be generated for the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"invoiceId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The reference number of the invoice generated for this order.\\r\\nThis can be used if the numbering sequence assigned to invoices is configured for manual numbering.\",\r\n \"nullable\": true\r\n },\r\n \"postPeriod\": {\r\n \"maxLength\": 6,\r\n \"type\": \"string\",\r\n \"description\": \"The post period for the invoice. This can be used to override the financial period. Must be a valid existing financial period.\",\r\n \"nullable\": true\r\n },\r\n \"dueDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The due date for the invoice created for the order. Default due date is set according to the credit terms.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"cashDiscountDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date when the cash discount is available for the invoice created for the order. Default date is set based on the terms selected in the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderFreightDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"cost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight cost calculated for the sales order, can be manually set if orders Ship via code allows it.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"premiumAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The additional freight charges for handling the order.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"taxCategoryId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"The tax category that applies to the freight amount.\\r\\nBy default, it is the tax category associated with the ship via code selected for the order.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderLineDto\": {\r\n \"required\": [\r\n \"inventoryId\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"inventoryId\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\",\r\n \"description\": \"The Inventory Id of the item to add\"\r\n },\r\n \"description\": {\r\n \"maxLength\": 256,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the description of the order line item. This will override the default description from the inventory item\\r\\n
Note that text fields should not contain any personally identifiable or otherwise sensitive data\",\r\n \"nullable\": true\r\n },\r\n \"unitOfMeasure\": {\r\n \"maxLength\": 6,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the Unit of measure for the line item. This will override the default UOM for the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"shippingRule\": {\r\n \"type\": \"string\",\r\n \"description\": \"The way the line item should be shipped. This will override the default or the one set on the order head.\\r\\n
One of the following options can be set:
CancelRemainder: The ordered quantity should be delivered in one shipmentBackOrderAllowed: The ordered quantity can be delivered in multiple shipments.ShipComplete: The ordered quantity should be delivered in one shipment.\",\r\n \"nullable\": true\r\n },\r\n \"quantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the quantity of items on the order line\",\r\n \"format\": \"double\"\r\n },\r\n \"unitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the unit cost of the product on the line. If no cost is set (null or omitted) the cost will be set\\r\\naccording to predefined rules\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"unitPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the unit price for the product on the line.\\r\\nIf no price is set(null or omitted) the price will be set according to predefined rules based on the inventoryId and the customer.\\r\\nNote that the behavior of the `unitPrice` field is affected by the `hasManualPrice` option.\\r\\nIf `hasManualPrice` is provided and set to \\\"false\\\", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"externalLink\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the external link for the line\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the warehouse the item should be shipped from. This will override the default, or the one set on the order head.\",\r\n \"nullable\": true\r\n },\r\n \"reasonCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the reason code for the line. This must be one of the selectable reason codes\",\r\n \"nullable\": true\r\n },\r\n \"taxCategoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the default tax category id (from customer's class). The value must be one of the selectable Tax Categories\",\r\n \"nullable\": true\r\n },\r\n \"undershipThreshold\": {\r\n \"maximum\": 100,\r\n \"minimum\": 0,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the undership threshold in percent. If not set, information from the inventory item is used\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"overshipThreshold\": {\r\n \"maximum\": 999,\r\n \"minimum\": 100,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the overship threshold in percent. If not set, information from the inventory item is used\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"shipDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the day the order line should be shipped, so that the customer gets it on the requested date (Ship On).\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"requestDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the date the order line is requested (Requested On)\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"salesAccountId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the Sales Account Id of the line. The value must be one of the selectable Accounts.\\r\\nIf not set, a value based on the rules is used\",\r\n \"nullable\": true\r\n },\r\n \"subaccount\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"string\"\r\n },\r\n \"description\": \"Overrides the Subaccount setup for the line.\\r\\nEach entry corresponds to a subaccount id/value pair\",\r\n \"nullable\": true\r\n },\r\n \"note\": {\r\n \"maxLength\": 2048,\r\n \"type\": \"string\",\r\n \"description\": \"Adds a text note to the sales order line.\",\r\n \"nullable\": true\r\n },\r\n \"discountCode\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the discount for the line if applicable. This must be one of the selectable discount codes.\\r\\n\\r\\nNote that the behavior of the 'discountCode' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountCode' is provided, the system will set the discountCode according to the predefined rules.\\r\\n\",\r\n \"nullable\": true\r\n },\r\n \"discountPercent\": {\r\n \"maximum\": 100,\r\n \"minimum\": -100,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the manual percentage discount for the line.\\r\\n\\r\\nNote that the behavior of the 'discountPercent' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountPercent' is provided, the system will set the discountPercent according to the predefined rules.\\r\\n\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the manual currency discount amount for the line.\\r\\n\\r\\nNote that the behavior of the 'discountAmount' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountAmount' is provided, the system will set the discountAmount according to the predefined rules.\\r\\n\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"hasManualDiscount\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that line level discount is applied manually.\\r\\n\\r\\nNote that the behavior of the fields 'discountCode', 'discountPercent' and 'discountAmount' is affected by this option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and discount field(s) is provided, the system will set the line level discounts according to the predefined rules.\\r\\n\",\r\n \"nullable\": true\r\n },\r\n \"warehouseLocationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the warehouse location that will be used for the shipment generated for the order the warehouse location Id for this line. This must be a valid location for `warehouseId` and will override the default if set.\",\r\n \"nullable\": true\r\n },\r\n \"operation\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of operation the line represents to the order. Acceptable values are 'Issue' or 'Receipt'. This must be a valid operation for sales order type.\",\r\n \"nullable\": true\r\n },\r\n \"hasManualPrice\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that the `unitPrice` in this line has been specified manually.\\r\\nIf set to \\\"false\\\", the system updates the unit price in the line according to predefined rules.\\r\\nNote that the behavior of the field `unitPrice` is affected by this option.\\r\\nIf `hasManualPrice` is provided and set to \\\"false\\\", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules.\",\r\n \"nullable\": true\r\n },\r\n \"branchId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"The branch with which this line is associated.\\r\\nIf no `BranchId` is provided, default is set from order `BranchId`\",\r\n \"nullable\": true\r\n },\r\n \"commissionable\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if line is comissionable.\\r\\nIf not set, the default value is picked from the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"salesPersonId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the sales person for the line.\\r\\nIf `SalesPersonId` is provided as (null), the value will be set from from order `SalesPersonId`\",\r\n \"nullable\": true\r\n },\r\n \"purchaseOrderSource\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the purchase source of the line.\\r\\nAccepted values are `dropShip` or `purchaseToOrder`, when no value provided, the default value is picked from the inventory item.\\r\\nIf the value was provided as '' (empty string), the value will set to null.\",\r\n \"nullable\": true\r\n },\r\n \"supplierId\": {\r\n \"type\": \"string\",\r\n \"description\": \"\\r\\n If the actual value was provided as (null), the value will be set from the inventory item preferred supplier,\\r\\n can be set only if the Purchase Order Source is set to `dropShip` or `purchaseToOrder`\\r\\n \",\r\n \"nullable\": true\r\n },\r\n \"supplierPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the supplier price for the line item.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"projectTaskId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"The project task with which this sales order line is associated\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderPaymentSettings\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"paymentMethodId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the default payment method set on the customer. This must be a valid and active payment method id.\",\r\n \"nullable\": true\r\n },\r\n \"cashAccountId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"The cash account associated with the set payment method.\",\r\n \"nullable\": true\r\n },\r\n \"paymentReference\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the external reference number for the order. This must be set if order type requires it.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderShippingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"scheduledDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the date the shipment is scheduled for\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"shipSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether the order should be shipped separately or included in a batch segment\",\r\n \"nullable\": true\r\n },\r\n \"rule\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the shipping rule for the order\",\r\n \"nullable\": true\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderAddressDto\"\r\n },\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderContactDto\"\r\n },\r\n \"preferredWarehouseId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the default site for the customer supplied to use on the order. Must be a valid site id\",\r\n \"nullable\": true\r\n },\r\n \"intrastatTransactionTypeId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Sets the intrastat transaction type id for the sales order, if not supplied the default value from the ordertype will be used. Must be a valid intrastat transaction type id.\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"shipViaId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the unique id that represents the carrier and its service to be used for shipping the ordered goods.\",\r\n \"nullable\": true\r\n },\r\n \"residentialDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether this is residential delivery\",\r\n \"nullable\": true\r\n },\r\n \"saturdayDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether this is a saturday delivery\",\r\n \"nullable\": true\r\n },\r\n \"insurance\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether insurance applies to this shipping\",\r\n \"nullable\": true\r\n },\r\n \"priority\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Sets priority of the order\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"zoneId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the shipping zone of the order freight\",\r\n \"nullable\": true\r\n },\r\n \"fobPointId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the point (such as a city or town) where the title of goods passes from the company to the customer.\",\r\n \"nullable\": true\r\n },\r\n \"termsId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the shipping terms used for the order.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderAddressDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"line1\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 1\",\r\n \"nullable\": true\r\n },\r\n \"line2\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 2\",\r\n \"nullable\": true\r\n },\r\n \"line3\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 3\",\r\n \"nullable\": true\r\n },\r\n \"postalCode\": {\r\n \"maxLength\": 20,\r\n \"type\": \"string\",\r\n \"description\": \"The postal code\",\r\n \"nullable\": true\r\n },\r\n \"city\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"The city\",\r\n \"nullable\": true\r\n },\r\n \"stateId\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"The state\",\r\n \"nullable\": true\r\n },\r\n \"countryId\": {\r\n \"maxLength\": 2,\r\n \"type\": \"string\",\r\n \"description\": \"The country.\",\r\n \"nullable\": true\r\n },\r\n \"overridesDefault\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this address overrides the default address\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines an address when updating a sales order.\\r\\nOnly the provided fields will be changed in address.\"\r\n },\r\n \"PatchSalesOrderBillingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderAddressDto\"\r\n },\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderContactDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderCommand\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the order date of the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"customer\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderCustomerDto\"\r\n },\r\n \"currencyId\": {\r\n \"maxLength\": 5,\r\n \"type\": \"string\",\r\n \"description\": \"Override the CurrencyId for the order. Must be a valid currency Id.\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Description for the order\\r\\n
Note that text fields should not contain any personally identifiable or otherwise sensitive data\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the status code for the order. Must be \\\"Open\\\", \\\"Hold\\\" or \\\"BackOrder\\\".\",\r\n \"nullable\": true\r\n },\r\n \"print\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderPrintDto\"\r\n },\r\n \"cancelBy\": {\r\n \"type\": \"string\",\r\n \"description\": \"Cancel by date for the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"shipping\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderShippingDto\"\r\n },\r\n \"billing\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderBillingDto\"\r\n },\r\n \"ownerId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the owner (employee) for the order\",\r\n \"nullable\": true\r\n },\r\n \"salesPersonId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets default sales person for the order\",\r\n \"nullable\": true\r\n },\r\n \"requestOn\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the requested on date for the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"financialInformation\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderFinancialInfoDto\"\r\n },\r\n \"paymentSettings\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderPaymentSettingsDto\"\r\n },\r\n \"note\": {\r\n \"maxLength\": 2048,\r\n \"type\": \"string\",\r\n \"description\": \"Any note to apply to the order header.\",\r\n \"nullable\": true\r\n },\r\n \"taxZoneId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Override the TaxZoneId for the order\",\r\n \"nullable\": true\r\n },\r\n \"useReplacementCostForMarginAndProfit\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"When this option is set to `true`, the `costTotal` of the order will be calculated based on `replacementUnitCost`.\\r\\nIf option is set to `false`, the `costTotal` will be calculated based on `unitCost`\",\r\n \"nullable\": true\r\n },\r\n \"freight\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderFreightDto\"\r\n },\r\n \"branchId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"The branch with which this order is associated.\",\r\n \"nullable\": true\r\n },\r\n \"originalOrderType\": {\r\n \"maxLength\": 2,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the type code for the original sales order\",\r\n \"nullable\": true\r\n },\r\n \"originalOrderId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the unique identifier of the original order\",\r\n \"nullable\": true\r\n },\r\n \"projectId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"The project with which this sales order is associated\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Application.Commands.PatchSalesOrder.PatchSalesOrderCommand is a command for updating parts of a sales order\"\r\n },\r\n \"PatchSalesOrderContactDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"name\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the full name of the contact\",\r\n \"nullable\": true\r\n },\r\n \"attention\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets any attention for the contact\",\r\n \"nullable\": true\r\n },\r\n \"phone1\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the primary phone number of the contact\",\r\n \"nullable\": true\r\n },\r\n \"email\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the e-mail address of the contact\",\r\n \"format\": \"email\",\r\n \"nullable\": true\r\n },\r\n \"overridesDefault\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this contact overrides the default contact\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines an contact when updating a sales order.\\r\\nOnly the provided fields will be changed in contact.\"\r\n },\r\n \"PatchSalesOrderCustomerDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique id of the the customer\",\r\n \"nullable\": true\r\n },\r\n \"refNo\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"The customer ref number text. If null or not supplied the value will not be changed\",\r\n \"nullable\": true\r\n },\r\n \"order\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"The customer order text.\",\r\n \"nullable\": true\r\n },\r\n \"contactId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The contact id for the customer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"termsId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the terms to use for the sales order.\\r\\nMust be a valid terms identifier\",\r\n \"nullable\": true\r\n },\r\n \"locationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the location for the customer supplied to use on the order.\\r\\nMust be a valid active location for the customer/>\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderFinancialInfoDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"invoiceSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets if the order should be invoiced/billed separately\",\r\n \"nullable\": true\r\n },\r\n \"invoiceDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the invoice date of the invoice that will be generated for the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"postPeriod\": {\r\n \"maxLength\": 6,\r\n \"type\": \"string\",\r\n \"description\": \"The post period for the invoice. This can be used to override the financial period. Must be a valid existing financial period.\",\r\n \"nullable\": true\r\n },\r\n \"dueDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The due date for the invoice created for the order. Default due date is set according to the credit terms.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"cashDiscountDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date when the cash discount is available for the invoice created for the order. Default date is set based on the terms selected in the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"invoiceId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The reference number of the invoice generated for this order.\\r\\nThis can be used if the numbering sequence assigned to invoices is configured for manual numbering.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderFreightDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"cost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight cost calculated for the sales order, can be manually set if orders Ship via code allows it.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"premiumAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The additional freight charges for handling the order.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"taxCategoryId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"The tax category that applies to the freight amount.\\r\\nBy default, it is the tax category associated with the ship via code selected for the order.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderLineDto\": {\r\n \"required\": [\r\n \"lineId\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lineId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The line id of the line.\",\r\n \"format\": \"int32\"\r\n },\r\n \"reasonCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"Patch the reason code for the line. This must be one of the selectable reason codes\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"maxLength\": 256,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the description of the order line item. This will override the default description from the inventory item\\r\\n
Note that text fields should not contain any personally identifiable or otherwise sensitive data\",\r\n \"nullable\": true\r\n },\r\n \"shippingRule\": {\r\n \"type\": \"string\",\r\n \"description\": \"The way the line item should be shipped.\\r\\n
One of the following options can be set:
CancelRemainder: The ordered quantity should be delivered in one shipmentBackOrderAllowed: The ordered quantity can be delivered in multiple shipments.ShipComplete: The ordered quantity should be delivered in one shipment.\",\r\n \"nullable\": true\r\n },\r\n \"unitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the unit cost of the product on the line.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"undershipThreshold\": {\r\n \"maximum\": 100,\r\n \"minimum\": 0,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the undership threshold in percent. If not set, information from the inventory item is used\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"overshipThreshold\": {\r\n \"maximum\": 999,\r\n \"minimum\": 100,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the overship threshold in percent. If not set, information from the inventory item is used\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"externalLink\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the external link for the line\",\r\n \"nullable\": true\r\n },\r\n \"note\": {\r\n \"maxLength\": 2048,\r\n \"type\": \"string\",\r\n \"description\": \"Any note to apply to the order header.\",\r\n \"nullable\": true\r\n },\r\n \"salesAccountId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the Sales Account Id of the line. The value must be one of the selectable Accounts.\\r\\nIf not set, a value based on the rules is used\",\r\n \"nullable\": true\r\n },\r\n \"projectTaskId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"The project task with which this sales order line is associated\",\r\n \"nullable\": true\r\n },\r\n \"sortOrder\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"shipDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the day the order line should be shipped, so that the customer gets it on the requested date (Ship On).\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"requestDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the date the order line is requested (Requested On)\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"warehouseLocationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the warehouse location that will be used for the shipment generated for the order the warehouse location Id for this line.\\r\\nThis must be a valid location for `warehouseId` and will override the default if set.\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the warehouse the item should be shipped from. This will override the default, or the one set on the order head.\",\r\n \"nullable\": true\r\n },\r\n \"subaccount\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"string\"\r\n },\r\n \"description\": \"Overrides the Subaccount setup for the line.\\r\\nEach entry corresponds to a subaccount id/value pair\",\r\n \"nullable\": true\r\n },\r\n \"hasManualDiscount\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that line level discount is applied manually.\\r\\n\\r\\nNote that the behavior of the fields 'discountCode', 'discountPercent' and 'discountAmount' is affected by this option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and discount field(s) is provided, the system will set the line level discounts according to the predefined rules.\\r\\n\",\r\n \"nullable\": true\r\n },\r\n \"discountPercent\": {\r\n \"maximum\": 100,\r\n \"minimum\": -100,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the manual percentage discount for the line.\\r\\n\\r\\nNote that the behavior of the 'discountPercent' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountPercent' is provided, the system will set the discountPercent according to the predefined rules.\\r\\n\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the manual currency discount amount for the line.\\r\\n\\r\\nNote that the behavior of the 'discountAmount' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountAmount' is provided, the system will set the discountAmount according to the predefined rules.\\r\\n\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"taxCategoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the default tax category id. The value must be one of the selectable Tax Categories\",\r\n \"nullable\": true\r\n },\r\n \"discountCode\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the discount for the line if applicable. This must be one of the selectable discount codes.\\r\\n\\r\\nNote that the behavior of the 'discountCode' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountCode' is provided, the system will set the discountCode according to the predefined rules.\\r\\n\",\r\n \"nullable\": true\r\n },\r\n \"quantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the quantity of items on the order line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"unitOfMeasure\": {\r\n \"maxLength\": 6,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the Unit of measure for the line item. This will override the default UOM for the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"unitPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the unit price for the product on the line.\\r\\nIf no price is set(null or omitted) the price will be set according to predefined rules based on the inventoryId and the customer.\\r\\nNote that the behavior of the `unitPrice` field is affected by the `hasManualPrice` option.\\r\\nIf `hasManualPrice` is provided and set to \\\"false\\\", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"operation\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of operation the line represents to the order. Acceptable values are 'Issue' or 'Receipt'. This must be a valid operation for sales order type.\",\r\n \"nullable\": true\r\n },\r\n \"hasManualPrice\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that the `unitPrice` in this line has been specified manually.\\r\\nIf set to \\\"false\\\", the system updates the unit price in the line according to predefined rules.\\r\\nNote that the behavior of the field `unitPrice` is affected by this option.\\r\\nIf `hasManualPrice` is provided and set to \\\"false\\\", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules.\",\r\n \"nullable\": true\r\n },\r\n \"branchId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the branch with which this line is associated.\\r\\nIf `BranchId` is provided as (null), the value will be set from from order `BranchId`\",\r\n \"nullable\": true\r\n },\r\n \"commissionable\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if line is comissionable.\",\r\n \"nullable\": true\r\n },\r\n \"salesPersonId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the sales person for the line.\\r\\nIf `SalesPersonId` is provided as (null), the value will be set from from order `SalesPersonId`\",\r\n \"nullable\": true\r\n },\r\n \"purchaseOrderSource\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the purchase source of the line.\\r\\nAccepted values are `dropShip` or `purchaseToOrder`, when null provided, value will be set from default value from the inventory item.\\r\\nIf the value was provided as '' (empty string), the value will set to null.\",\r\n \"nullable\": true\r\n },\r\n \"supplierId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the Purchase Order Vendor for the line, can be set if the purchase order source is `purchaseToOrder` or `dropShip`.\",\r\n \"nullable\": true\r\n },\r\n \"supplierPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the supplier price for the line item.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The sales order line which is set to patch\"\r\n },\r\n \"PatchSalesOrderLinesCommand\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lines\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderLineDto\"\r\n },\r\n \"description\": \"The sales order lines that are set to patch\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Application.Commands.PatchSalesOrderLines.PatchSalesOrderLinesCommand is a command for updating the lines of a sales order\"\r\n },\r\n \"PatchSalesOrderPaymentSettingsDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"paymentMethodId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the default payment method set on the customer. This must be a valid and active payment method id.\",\r\n \"nullable\": true\r\n },\r\n \"cashAccountId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"The cash account associated with the set payment method.\",\r\n \"nullable\": true\r\n },\r\n \"paymentReference\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the external reference number for the order. This must be set if order type requires it.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderShippingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"shipSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether the order should be shipped separately or included in a batch segment\",\r\n \"nullable\": true\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderAddressDto\"\r\n },\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderContactDto\"\r\n },\r\n \"preferredWarehouseId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the default site for the customer supplied to use on the order. Must be a valid site id\\r\\nIf empty string, the default site for order will be removed\",\r\n \"nullable\": true\r\n },\r\n \"rule\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the shipping rule for the order\",\r\n \"nullable\": true\r\n },\r\n \"scheduledDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the date the shipment is scheduled for\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"intrastatTransactionTypeId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Sets the intrastat transaction type id for the sales order. Must be a valid intrastat transaction type id.\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"shipViaId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the unique id that represents the carrier and its service to be used for shipping the ordered goods. Must be a valid carrier id.\\r\\nIf empty string then the value will be set to null\",\r\n \"nullable\": true\r\n },\r\n \"residentialDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether this is residential delivery\",\r\n \"nullable\": true\r\n },\r\n \"saturdayDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether this is a saturday delivery\",\r\n \"nullable\": true\r\n },\r\n \"insurance\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether insurance applies to this shipping\",\r\n \"nullable\": true\r\n },\r\n \"priority\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Sets priority of the order\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"zoneId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the shipping zone of the order freight\",\r\n \"nullable\": true\r\n },\r\n \"fobPointId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the point (such as a city or town) where the title of goods passes from the company to the customer.\",\r\n \"nullable\": true\r\n },\r\n \"termsId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the shipping terms used for the order.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"ProblemDetails\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"title\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"detail\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"instance\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": {}\r\n },\r\n \"ProjectDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n },\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal unique identifier of the project\",\r\n \"format\": \"int32\"\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.ProjectDto class defines a project reference for a sales order\"\r\n },\r\n \"SalesOrderBillingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/ContactDto\"\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/AddressDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderCommissionDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"salesPersonId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id of the sales person that gets the commision\",\r\n \"nullable\": true\r\n },\r\n \"percent\": {\r\n \"type\": \"number\",\r\n \"description\": \"The commission percent\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"amount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The commission amount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"commissionableAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The order's commissionable amount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderCustomerDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal unique id of the customer\",\r\n \"format\": \"int32\"\r\n },\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique id of the the customer\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer name\",\r\n \"nullable\": true\r\n },\r\n \"taxZone\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"contactId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The contact id for the customer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"order\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer order text\",\r\n \"nullable\": true\r\n },\r\n \"refNo\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer ref number text\",\r\n \"nullable\": true\r\n },\r\n \"location\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderDiscountDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"manualOrderIndex\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The number of discount line set for the order\",\r\n \"format\": \"int32\"\r\n },\r\n \"skipDiscount\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the discount has been cancelled for the order and is not applicable\"\r\n },\r\n \"discountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the discount applied to the order\",\r\n \"nullable\": true\r\n },\r\n \"discountSequenceId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the discount sequence of the discount ID applied to the order\",\r\n \"nullable\": true\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of discount whose sequence was applied to the document(Group or Document)\",\r\n \"nullable\": true\r\n },\r\n \"isManual\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that the discount has been applied manually\"\r\n },\r\n \"discountableAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amount used as a base for discount calculation if the discount is based on amount.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountableQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity used as a base for discount calculation if the discount is based on quantity.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amount of the discount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountPercent\": {\r\n \"type\": \"number\",\r\n \"description\": \"The discount percent, if the discount is defined to be calculated as a percentage\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"freeItem\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"freeItemQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of the free item. Used to set the quantity for the order line generate by a free item discount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type code for the sales order\",\r\n \"nullable\": true\r\n },\r\n \"orderId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique identifier of the order\",\r\n \"nullable\": true\r\n },\r\n \"branch\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"Description of the order\",\r\n \"nullable\": true\r\n },\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"Date the order was submitted\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"cancelBy\": {\r\n \"type\": \"string\",\r\n \"description\": \"The cancel date for the order\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"lastModified\": {\r\n \"type\": \"string\",\r\n \"description\": \"Date the order was last modified\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"requestOn\": {\r\n \"type\": \"string\",\r\n \"description\": \"Date the order was requested\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"isRotRutDeductable\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether the order is ROT/RUT deductible\"\r\n },\r\n \"orderQty\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total quantity of inventory items in the order\",\r\n \"format\": \"double\"\r\n },\r\n \"note\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any notes on the order\",\r\n \"nullable\": true\r\n },\r\n \"currencyId\": {\r\n \"type\": \"string\",\r\n \"description\": \"CurrencyId for the order.\",\r\n \"nullable\": true\r\n },\r\n \"useReplacementCostForMarginAndProfit\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"When this option is set to `true`, the `costTotal` of the order will be calculated based on `replacementUnitCost`.\\r\\nIf option is set to `false`, the `costTotal` will be calculated based on `unitCost`\",\r\n \"nullable\": true\r\n },\r\n \"createdBy\": {\r\n \"type\": \"string\",\r\n \"description\": \"The user name of the creator of the order. If the order was created by an API call this field will be null or empty.\",\r\n \"nullable\": true\r\n },\r\n \"project\": {\r\n \"$ref\": \"#/components/schemas/ProjectDto\"\r\n },\r\n \"print\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderPrintDto\"\r\n },\r\n \"billing\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderBillingDto\"\r\n },\r\n \"paymentSettings\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderPaymentDto\"\r\n },\r\n \"financialInformation\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderFinancialInfoDto\"\r\n },\r\n \"owner\": {\r\n \"$ref\": \"#/components/schemas/EmployeeDto\"\r\n },\r\n \"origin\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderOriginDto\"\r\n },\r\n \"shipping\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderShippingDto\"\r\n },\r\n \"status\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderStatusDto\"\r\n },\r\n \"customer\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderCustomerDto\"\r\n },\r\n \"totals\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderTotalsDto\"\r\n },\r\n \"freight\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderFreightDto\"\r\n },\r\n \"originalOrderType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type code for the original sales order\",\r\n \"nullable\": true\r\n },\r\n \"originalOrderId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique identifier of the original order\",\r\n \"nullable\": true\r\n },\r\n \"salesPerson\": {\r\n \"$ref\": \"#/components/schemas/SalesPersonDto\"\r\n },\r\n \"version\": {\r\n \"type\": \"string\",\r\n \"description\": \"An internal order version used for detecting concurrent updates to an order\",\r\n \"format\": \"byte\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderExpansions\": {\r\n \"enum\": [\r\n \"None\",\r\n \"Billing\",\r\n \"Payment\",\r\n \"FinancialInformation\",\r\n \"Shipping\",\r\n \"Customer\",\r\n \"Owner\",\r\n \"Origin\",\r\n \"Note\",\r\n \"Freight\",\r\n \"All\"\r\n ],\r\n \"type\": \"string\",\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.SalesOrderExpansions enumeration defines individual parts of the Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDto that can be filled\"\r\n },\r\n \"SalesOrderFinancialInfoDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"invoiceSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether the order should be invoiced separately\"\r\n },\r\n \"invoiceId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id of the invoice issued for the order\",\r\n \"nullable\": true\r\n },\r\n \"invoiceDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The invoice date\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"dueDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The due date for the invoice\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"terms\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"cashDiscountDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date for the cash discount\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"postPeriod\": {\r\n \"type\": \"string\",\r\n \"description\": \"The post period for the invoice\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderFreightDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"volume\": {\r\n \"type\": \"number\",\r\n \"format\": \"double\"\r\n },\r\n \"weight\": {\r\n \"type\": \"number\",\r\n \"format\": \"double\"\r\n },\r\n \"cost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight cost calculated for the sales order,\",\r\n \"format\": \"double\"\r\n },\r\n \"costInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight cost calculated for the sales order in base currency.\",\r\n \"format\": \"double\"\r\n },\r\n \"premiumAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The additional freight charges for handling the order.\",\r\n \"format\": \"double\",\r\n \"readOnly\": true\r\n },\r\n \"premiumAmountInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The additional freight charges in base currency for handling the order.\",\r\n \"format\": \"double\",\r\n \"readOnly\": true\r\n },\r\n \"amount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amounts calculated based on the ship terms.\\r\\n///\",\r\n \"format\": \"double\"\r\n },\r\n \"amountInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amounts calculated based on the ship terms in base currency of the order.\",\r\n \"format\": \"double\"\r\n },\r\n \"taxCategoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The tax category that applies to the freight amount.\\r\\nBy default, it is the tax category associated with the ship via code selected for the order.\",\r\n \"nullable\": true,\r\n \"readOnly\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderLineDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lineId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The line number of the sales order line\",\r\n \"format\": \"int32\"\r\n },\r\n \"sortOrder\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Used to apply sort order to a set of lines\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"lineType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of sales order line\",\r\n \"nullable\": true\r\n },\r\n \"operation\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of operation the line represents to the order\",\r\n \"nullable\": true\r\n },\r\n \"orderDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date the order line was added\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"branch\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"inventory\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineInventoryDto\"\r\n },\r\n \"unitOfMeasure\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unit of measure (UOM) for the sales order line\",\r\n \"nullable\": true\r\n },\r\n \"quantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of unit of measure this line represents\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"baseOrderQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The base order quantity for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"unitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The unit cost of items on this order line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"unitPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"The unit price for items on this order line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any description for this order line\",\r\n \"nullable\": true\r\n },\r\n \"shippingRule\": {\r\n \"type\": \"string\",\r\n \"description\": \"The shipping rule code for this order line\",\r\n \"nullable\": true\r\n },\r\n \"completed\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this order line is completed or not\",\r\n \"nullable\": true\r\n },\r\n \"extendedPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"The extended price for this sales order line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"lineTotalBeforeDiscount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The line total before any discounts are applied\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The discount amount for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"externalLink\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any external link for this sales order line\",\r\n \"nullable\": true\r\n },\r\n \"taxCategoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The Tax Category Id applying to this order line\",\r\n \"nullable\": true\r\n },\r\n \"reasonCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"The reason code\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The Site Id for items on this line\",\r\n \"nullable\": true\r\n },\r\n \"undershipThreshold\": {\r\n \"type\": \"number\",\r\n \"description\": \"The undership threshold value (%)\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"overshipThreshold\": {\r\n \"type\": \"number\",\r\n \"description\": \"The overship threshold value (%)\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"shipDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The expected shipping date for this order line\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"requestDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The request date for this order line\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"note\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any note that has been applied to this order line\",\r\n \"nullable\": true\r\n },\r\n \"salesAccountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The general ledger account this line applies to\",\r\n \"nullable\": true\r\n },\r\n \"subaccount\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"string\"\r\n },\r\n \"description\": \"The general ledger subaccount this line applies to\",\r\n \"nullable\": true\r\n },\r\n \"openQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The open quantity for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"billedQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The billed quantity for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"quantityOnShipments\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity on shipments for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountPercent\": {\r\n \"type\": \"number\",\r\n \"description\": \"Discount percentage applied to this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"Code of discount applied to this line\",\r\n \"nullable\": true\r\n },\r\n \"hasManualDiscount\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Discount is applied manually\"\r\n },\r\n \"freeItem\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether these item(s) are free or not\"\r\n },\r\n \"warehouseLocation\": {\r\n \"$ref\": \"#/components/schemas/LocationDto\"\r\n },\r\n \"replacementUnitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The replacement unit cost of an item. This is set based on the supplier price.\\r\\nIf no supplier price found, the last price of the item's default supplier will be used.\\r\\nIf no default supplier is set, the last cost of the item will be used.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"hasManualPrice\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Unit price is applied manually\"\r\n },\r\n \"inventoryAlternateId\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"openLine\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if line has quantity left to be shipped\"\r\n },\r\n \"commissionable\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if line is comissionable\"\r\n },\r\n \"salesPerson\": {\r\n \"$ref\": \"#/components/schemas/SalesPersonDto\"\r\n },\r\n \"purchaseOrderSource\": {\r\n \"type\": \"string\",\r\n \"description\": \"Information about line purchase order source\",\r\n \"nullable\": true\r\n },\r\n \"supplier\": {\r\n \"$ref\": \"#/components/schemas/SupplierDto\"\r\n },\r\n \"supplierPrice\": {\r\n \"type\": \"number\",\r\n \"format\": \"double\"\r\n },\r\n \"projectTaskId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The project task with which this sales order line is associated\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderLineDtoPagedResult\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"value\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDto\"\r\n },\r\n \"description\": \"Gets or sets the items that are paged\",\r\n \"nullable\": true\r\n },\r\n \"nextPage\": {\r\n \"type\": \"string\",\r\n \"description\": \"Gets or sets the link to the next page with more results. If set to null then no more records are present.\",\r\n \"nullable\": true\r\n },\r\n \"totalCount\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderLineInventoryDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n },\r\n \"baseUnit\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderListDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"_links\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"$ref\": \"#/components/schemas/DtoLink\"\r\n },\r\n \"description\": \"Links applicable for the dto\",\r\n \"nullable\": true\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of the order\",\r\n \"nullable\": true\r\n },\r\n \"orderId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The order id (a.k.a OrderCd) for the order\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"string\",\r\n \"description\": \"The current status of the order\",\r\n \"nullable\": true\r\n },\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"The order date\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"shippingScheduledDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date shipment is scheduled\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"customerId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer Id for the order (a.k.a CustoemrCd)\",\r\n \"nullable\": true\r\n },\r\n \"customerName\": {\r\n \"type\": \"string\",\r\n \"description\": \"The name of the customer as it appears on the order\",\r\n \"nullable\": true\r\n },\r\n \"orderQty\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total number of items on the order\",\r\n \"format\": \"double\"\r\n },\r\n \"orderTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total amount on the order\",\r\n \"format\": \"double\"\r\n },\r\n \"currency\": {\r\n \"type\": \"string\",\r\n \"description\": \"The currency id for the order\",\r\n \"nullable\": true\r\n },\r\n \"location\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer location for this order\",\r\n \"nullable\": true\r\n },\r\n \"requestOn\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date the order is requested\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"customerOrder\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer order link\",\r\n \"nullable\": true\r\n },\r\n \"customerRefNo\": {\r\n \"type\": \"string\",\r\n \"description\": \"The order reference number of the customer\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any description on the order\",\r\n \"nullable\": true\r\n },\r\n \"lastModified\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date and time the order was last modified\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderListDtoPagedResult\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"value\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDto\"\r\n },\r\n \"description\": \"Gets or sets the items that are paged\",\r\n \"nullable\": true\r\n },\r\n \"nextPage\": {\r\n \"type\": \"string\",\r\n \"description\": \"Gets or sets the link to the next page with more results. If set to null then no more records are present.\",\r\n \"nullable\": true\r\n },\r\n \"totalCount\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderOriginDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"_links\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"$ref\": \"#/components/schemas/DtoLink\"\r\n },\r\n \"description\": \"Links applicable for the dto\",\r\n \"nullable\": true\r\n },\r\n \"orderType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The order type code for the origin order\",\r\n \"nullable\": true\r\n },\r\n \"orderId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique id of the origin order\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderPaymentDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"paymentMethod\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"cashAccountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The cash account to use\",\r\n \"nullable\": true\r\n },\r\n \"paymentReference\": {\r\n \"type\": \"string\",\r\n \"description\": \"The payment reference\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderPrintDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"descriptionOnInvoice\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Set to true to print description on the invoice\",\r\n \"nullable\": true\r\n },\r\n \"noteOnInternalDocuments\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Set to true to print note on internal documents\",\r\n \"nullable\": true\r\n },\r\n \"noteOnExternalDocuments\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Set to true to print note on external documents\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderRotRutDistributionDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lineId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Reference to the order line\",\r\n \"format\": \"int32\"\r\n },\r\n \"personalId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The personal id\",\r\n \"nullable\": true\r\n },\r\n \"amount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"extra\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this is extra or not\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderRotRutDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"distributedAutomatically\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether the ROT/RUT is distributed automatically\"\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of ROT/RUT\",\r\n \"nullable\": true\r\n },\r\n \"appartment\": {\r\n \"type\": \"string\",\r\n \"description\": \"The appartment reference\",\r\n \"nullable\": true\r\n },\r\n \"estate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The estate reference\",\r\n \"nullable\": true\r\n },\r\n \"organizationNumber\": {\r\n \"type\": \"string\",\r\n \"description\": \"The organization number\",\r\n \"nullable\": true\r\n },\r\n \"distribution\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderRotRutDistributionDto\"\r\n },\r\n \"description\": \"The distrinbution entries\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderShipmentDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of the shipment\",\r\n \"nullable\": true\r\n },\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id of a shipments created for the order\",\r\n \"nullable\": true\r\n },\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date of the shipment\",\r\n \"format\": \"date-time\"\r\n },\r\n \"quantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of goods on the shipment\",\r\n \"format\": \"double\"\r\n },\r\n \"weight\": {\r\n \"type\": \"number\",\r\n \"description\": \"The weight of the shipped goods\",\r\n \"format\": \"double\"\r\n },\r\n \"volume\": {\r\n \"type\": \"number\",\r\n \"description\": \"The volume of the shipped goods\",\r\n \"format\": \"double\"\r\n },\r\n \"invoiceType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of invoice\",\r\n \"nullable\": true\r\n },\r\n \"invoiceId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id of the invoice\",\r\n \"nullable\": true\r\n },\r\n \"inventoryDocumentType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of inventory document created for the shipment\",\r\n \"nullable\": true\r\n },\r\n \"inventoryReferenceId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id of the inventory document created for the shipment\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderShipmentDto specifies a shipment line detail for a sales order\"\r\n },\r\n \"SalesOrderShippingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/ContactDto\"\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/AddressDto\"\r\n },\r\n \"scheduledDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The shipping scheduled date\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"shipSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this order can/is shipped separately\"\r\n },\r\n \"rule\": {\r\n \"type\": \"string\",\r\n \"description\": \"The shipping rule\",\r\n \"nullable\": true\r\n },\r\n \"preferredWarehouse\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"shipVia\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"fobPoint\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"terms\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"zone\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"residentialDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this is residential delivery\"\r\n },\r\n \"saturdayDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this is a saturday delivery\"\r\n },\r\n \"insurance\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether insurance applies to this shipping\"\r\n },\r\n \"intrastatTransactionType\": {\r\n \"$ref\": \"#/components/schemas/IdDescriptionPairDto\"\r\n },\r\n \"priority\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Priority of the order\",\r\n \"format\": \"int32\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderStatusDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The status code for the order\",\r\n \"nullable\": true\r\n },\r\n \"cancelled\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this order is in a cancelled state\"\r\n },\r\n \"hold\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this order is in a held state\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderTaxDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"taxId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique tax identifier of the specific tax applied to the document\",\r\n \"nullable\": true\r\n },\r\n \"taxRate\": {\r\n \"type\": \"number\",\r\n \"description\": \"The tax rate used for the tax\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"taxableAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The calculated taxable amount for the specific tax\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"taxAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The calculated tax amount for the specific tax\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"exemptTax\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the taxable amount will be included in taxExemptTotal\"\r\n },\r\n \"includeInTaxable\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the taxable amount will be included in taxableTotal\"\r\n },\r\n \"isPendingTax\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the tax calculated is treated as a pending tax\"\r\n },\r\n \"isStatisticalTax\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the tax calculated is treated as a statistical tax\"\r\n },\r\n \"isReverseTax\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the tax is treated as a reverse tax\"\r\n },\r\n \"taxType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of tax, which can be Sales, Use, VAT or Withholding\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderTaxDto specifies a tax line detail for a sales order\"\r\n },\r\n \"SalesOrderTotalsDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"orderTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The order total\",\r\n \"format\": \"double\"\r\n },\r\n \"orderTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The order total in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"taxableTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The VAT taxable total\",\r\n \"format\": \"double\"\r\n },\r\n \"taxableTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The VAT taxable in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"taxExemptTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The VAT exempt total\",\r\n \"format\": \"double\"\r\n },\r\n \"taxExemptTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The VAT exempt total in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"taxTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The tax total\",\r\n \"format\": \"double\"\r\n },\r\n \"taxTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The tax total in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"discountTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The discount total\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The discount total in base currency\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"costTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total of the costs on the lines of the sales order. How the `costTotal` is calculated is dependent on the option `useReplacementCostForMarginAndProfit`.\\r\\nIf this option is `true` the `costTotal` will be calculated based on the `replacementUnitCost`.\\r\\nIf this option is `false`, the `costTotal` will be calculate based on `unitCost`\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"costTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total of the costs on the lines of the sales order in base currency.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"freightCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight cost calculated for the sales order. Not applicable for transfer order types.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"freightCostInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight cost calculated for the sales order in base currency. Not applicable for transfer order types.\",\r\n \"format\": \"double\",\r\n \"nullable\": true,\r\n \"readOnly\": true\r\n },\r\n \"freightTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight amount calculated in accordance with the shipping terms. Not applicable for transfer order types.\",\r\n \"format\": \"double\"\r\n },\r\n \"freightTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight amount calculated in accordance with the shipping terms in base currency. Not applicable for transfer order types.\",\r\n \"format\": \"double\"\r\n },\r\n \"unbilledAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The sum of unbilled amounts for the lines\",\r\n \"format\": \"double\"\r\n },\r\n \"unbilledAmountInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The sum of unbilled amounts for the lines in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"unshippedAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The sum of unshipped amounts for the lines\",\r\n \"format\": \"double\"\r\n },\r\n \"unshippedAmountInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The sum of unshipped amounts for the lines in base currency\",\r\n \"format\": \"double\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderValidationProblemDetails\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"title\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"detail\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"instance\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"errors\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"nullable\": true,\r\n \"readOnly\": true\r\n },\r\n \"details\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/ValidationErrorCodeDetails\"\r\n },\r\n \"description\": \"List with details for all the validation problems\",\r\n \"nullable\": true,\r\n \"readOnly\": true\r\n }\r\n },\r\n \"additionalProperties\": {},\r\n \"description\": \"Defines an error response for validation problems\"\r\n },\r\n \"SalesPersonDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SupplierDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"ValidationErrorCodeDetails\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"code\": {\r\n \"type\": \"string\",\r\n \"description\": \"Error code\",\r\n \"nullable\": true,\r\n \"example\": \"0001-NullNotAllowed\"\r\n },\r\n \"message\": {\r\n \"type\": \"string\",\r\n \"description\": \"Detailed validation message\",\r\n \"nullable\": true,\r\n \"example\": \"Null value not allowed\"\r\n },\r\n \"parameters\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {},\r\n \"description\": \"Extra parameters related to the validation problem.\\r\\nIf the validation problem refers to a particular field the \\\"property\\\" element will contain the field name\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines details related to validation problems\"\r\n },\r\n \"WarehouseAvailabilityDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalWarehouseId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The internal id used by the system for the warehouse\",\r\n \"format\": \"int32\"\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id (SiteCd) of the warehouse\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description of the warehouse\",\r\n \"nullable\": true\r\n },\r\n \"quantityOnHand\": {\r\n \"type\": \"number\",\r\n \"description\": \"Physical quantity on-hand of items in the specific warehouse\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityAvailable\": {\r\n \"type\": \"number\",\r\n \"description\": \"You can configure the way this estimated quantity is calculated by using availability\\r\\ncalculation rules. The available quantity may include anticipated transactions and therefore\\r\\nmay be less than or greater than the QuantityOnHand. Anticipated transactions correspond\\r\\nto the documents and transactions that have been entered in the system but not yet\\r\\nprocessed to the end.\\r\\nIn the availability calculation settings of an item class, you specify which anticipated\\r\\ntransactions affect the available quantity. Thus, the available quantity may include\\r\\ngoods on purchase orders and exclude the goods allocated for sales orders. You can use\\r\\nthe available quantity as an indicator of demand\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityAvailableForShipment\": {\r\n \"type\": \"number\",\r\n \"description\": \"Estimated quantity calculated by using the following formula: the QuantityOnHand minus the quantity on unreleased inventory\\r\\nissues, minus the quantity allocated for shipping. Thus, the QuantityAvailableForShipment can be less than the QuantityOnHand\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityNotAvailable\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity stored at locations not included in the availability calculation.\\r\\nFor each warehouse location, the 'Include in Qty. Available' check box on the\\r\\nWarehouses(IN204000) screen defines whether the quantity of items stored at this\\r\\nlocation is included in the quantity of available items.\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityPurchaseOrders\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of the inventory item included in open purchase orders.\",\r\n \"format\": \"double\"\r\n },\r\n \"estimatedUnitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The estimated cost per unit, calculated as EstimatedTotalCost/QuantityOnHand\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"estimatedTotalCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total cost for the QuantityOnHand\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"lastModified\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date and time the entry for this warehouse was modified\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"locations\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/LocationAvailabilityDto\"\r\n },\r\n \"description\": \"List of locations in the warehouse for the specific inventory item.\\r\\nNote that this is not returned as part of the response unless expand=Location is specified with the request.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Warehouse information for a specific inventory item\"\r\n }\r\n },\r\n \"securitySchemes\": {\r\n \"oauth2\": {\r\n \"type\": \"oauth2\",\r\n \"description\": \"\",\r\n \"flows\": {\r\n \"clientCredentials\": {\r\n \"tokenUrl\": \"https://connect.visma.com/connect/token\",\r\n \"scopes\": {\r\n \"visma.net.erp.salesorder:read\": \"Read sales order data\",\r\n \"visma.net.erp.salesorder:write\": \"Create or update sales order data\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"x-visma-erp-error-codes\": [\r\n {\r\n \"code\": \"0001-NullNotAllowed\",\r\n \"description\": \"Null value not allowed\"\r\n },\r\n {\r\n \"code\": \"0001-EmptyNotAllowed\",\r\n \"description\": \"Empty value not allowed\"\r\n },\r\n {\r\n \"code\": \"0002-InvalidLength\",\r\n \"description\": \"Invalid length\"\r\n },\r\n {\r\n \"code\": \"0003-InvalidValue\",\r\n \"description\": \"Invalid value\"\r\n },\r\n {\r\n \"code\": \"0004-ValueNotAllowed\",\r\n \"description\": \"Value not allowed\"\r\n },\r\n {\r\n \"code\": \"0100-OutsideValidRange\",\r\n \"description\": \"Value is outside the valid range\"\r\n },\r\n {\r\n \"code\": \"0200-LineIdDoesNotExist\",\r\n \"description\": \" Line Id {0}. Line with provided Id does not exists in the order\"\r\n },\r\n {\r\n \"code\": \"1100-InvalidDiscount\",\r\n \"description\": \"Document/Group discount cannot exceed the line total\"\r\n },\r\n {\r\n \"code\": \"1101-DiscountAmountMoreThanExtPrice\",\r\n \"description\": \"Discount amount can not be greater than Extended Price\"\r\n },\r\n {\r\n \"code\": \"1102-DiscountSetupInvalid\",\r\n \"description\": \"Discount setup is not valid for discounts calculations\"\r\n },\r\n {\r\n \"code\": \"1103-DiscountNotApplicable\",\r\n \"description\": \"Discount can not be applied to line\"\r\n },\r\n {\r\n \"code\": \"1104-FreeItemNotFound\",\r\n \"description\": \"Free item specified in header discount was not found.\"\r\n },\r\n {\r\n \"code\": \"1105-InvalidDiscountCode\",\r\n \"description\": \"Invalid DiscountCode. The Discount is missing or invalid\"\r\n },\r\n {\r\n \"code\": \"1200-SubaccountSegmentInactive\",\r\n \"description\": \"Subaccount segment values inactive\"\r\n },\r\n {\r\n \"code\": \"1201-SubaccountInactive\",\r\n \"description\": \"Subaccount is not Active\"\r\n },\r\n {\r\n \"code\": \"1202-SegmentValueNotFound\",\r\n \"description\": \"Segment value for Subaccount cannot be found\"\r\n },\r\n {\r\n \"code\": \"1203-SubaccountNotFound\",\r\n \"description\": \"Could not find Subaccount segment value\"\r\n },\r\n {\r\n \"code\": \"1204-SubaccountError\",\r\n \"description\": \"Validation errors for the subaccount\"\r\n },\r\n {\r\n \"code\": \"1300-InvalidShipComplete\",\r\n \"description\": \"If require location and not require shipping then ship complete cannot be set to back order allowed\"\r\n },\r\n {\r\n \"code\": \"1310-FreightCostCanNotBeSetManually\",\r\n \"description\": \"Freight cost is not allowed to be set manually according to the Ship Via Code settings\"\r\n },\r\n {\r\n \"code\": \"1400-CustomerLookupException\",\r\n \"description\": \"Exception searching customer\"\r\n },\r\n {\r\n \"code\": \"1401-MissingTermsId\",\r\n \"description\": \"TermsId cannot be empty in the order. Set a default terms on the customer or specify the terms for the order\"\r\n },\r\n {\r\n \"code\": \"1402-PaymentMethodIdNotFound\",\r\n \"description\": \"Payment method set for order can not be found\"\r\n },\r\n {\r\n \"code\": \"1403-InactivePaymentMethodId\",\r\n \"description\": \"Payment methods set for order is inactive\"\r\n },\r\n {\r\n \"code\": \"1404-InvalidPaymentMethodId\",\r\n \"description\": \"Payment method set for order can not be used in sales orders\"\r\n },\r\n {\r\n \"code\": \"1405-PaymentReferenceRequired\",\r\n \"description\": \"Payment reference not set, order type requires it\"\r\n },\r\n {\r\n \"code\": \"1406-PaymentReferenceProhibited\",\r\n \"description\": \"Order type does not allow payment reference\"\r\n },\r\n {\r\n \"code\": \"1407-InvalidCustomerStatus\",\r\n \"description\": \"Invalid Customer Status\"\r\n },\r\n {\r\n \"code\": \"1408-OverrideCurrencyIdProhibited\",\r\n \"description\": \"Currency Id can not be overridden\"\r\n },\r\n {\r\n \"code\": \"1409-PaymentMethodRequired\",\r\n \"description\": \"Payment method not set, order type requires it\"\r\n },\r\n {\r\n \"code\": \"1500-CashAccountRequired\",\r\n \"description\": \"Cash account not set, order type requires it\"\r\n },\r\n {\r\n \"code\": \"1501-CashAccountInactive\",\r\n \"description\": \"Cash account set for order is inactive\"\r\n },\r\n {\r\n \"code\": \"1502-CashAccountNotFound\",\r\n \"description\": \"Cash account set on order can not be found\"\r\n },\r\n {\r\n \"code\": \"1503-CashAccountInvalidForPaymentMethod\",\r\n \"description\": \"Cash account cannot be used with the set Payment Method\"\r\n },\r\n {\r\n \"code\": \"1504-CashAccountInvalidForBranch\",\r\n \"description\": \"Cash account not allowed to be used with the set Branch\"\r\n },\r\n {\r\n \"code\": \"1600-FinancialPeriodNotFound\",\r\n \"description\": \"No financial period that matches the selected Invoice date can be found. Please change the Invoice Date, set the Financial period for the order or create Financial periods\"\r\n },\r\n {\r\n \"code\": \"1601-FinancialPeriodClosed\",\r\n \"description\": \"Financial period '{0}' is closed and cannot be set for order\"\r\n },\r\n {\r\n \"code\": \"1602-FinancialPeriodInactive\",\r\n \"description\": \"Financial period is inactive. Activate it or set another period\"\r\n },\r\n {\r\n \"code\": \"1603-FinancialPeriodNotApplicable\",\r\n \"description\": \"Post period cannot be set for this order type\"\r\n },\r\n {\r\n \"code\": \"1700-WarehouseLocationNotFound\",\r\n \"description\": \"Warehouse location is not found\"\r\n },\r\n {\r\n \"code\": \"1701-WarehouseLocationInactive\",\r\n \"description\": \"Warehouse location is inactive\"\r\n },\r\n {\r\n \"code\": \"1703-WarehouseLocationInvalid\",\r\n \"description\": \"Sales not allowed for warehouse location set for line\"\r\n },\r\n {\r\n \"code\": \"1704-InvalidOrderType\",\r\n \"description\": \"Not possible to update warehouse for line with line number {0}. Setting warehouse location is allowed only for not shippable orders.\"\r\n },\r\n {\r\n \"code\": \"1705-DuplicatedSiteCds\",\r\n \"description\": \"Duplicated site cds\"\r\n },\r\n {\r\n \"code\": \"1800-InvalidLineOperation\",\r\n \"description\": \"Given line operation is not accepted for this order type\"\r\n },\r\n {\r\n \"code\": \"1801-MissingReasonCode\",\r\n \"description\": \"Reason code is not set and order type requires it\"\r\n },\r\n {\r\n \"code\": \"1802-InvalidWarehouseId\",\r\n \"description\": \"Invalid Warehouse Id, or Warehouse Id not found\"\r\n },\r\n {\r\n \"code\": \"1803-UniqueInventoryIdNotFound\",\r\n \"description\": \"Cannot find unique InventoryId for inventoryId: '{0}'\"\r\n },\r\n {\r\n \"code\": \"1804-InventoryIdNotFound\",\r\n \"description\": \"InventoryId cannot be found or is invalid\"\r\n },\r\n {\r\n \"code\": \"1805-InvalidTaxCategoryId\",\r\n \"description\": \"Invalid TaxCategoryId, or TaxCategory not found\"\r\n },\r\n {\r\n \"code\": \"1806-InvalidSalesAccountId\",\r\n \"description\": \"Invalid SalesAccountId specified\"\r\n },\r\n {\r\n \"code\": \"1807-InvalidReasonCode\",\r\n \"description\": \"Invalid ReasonCode, or ReasonCode not found\"\r\n },\r\n {\r\n \"code\": \"1808-InvalidUnitOfMeasure\",\r\n \"description\": \"Invalid Unit of Measure\"\r\n },\r\n {\r\n \"code\": \"1809-InvalidQuantityForType\",\r\n \"description\": \"Quantity must be zero or positive when inventory item is not of type MiscCharge\"\r\n },\r\n {\r\n \"code\": \"1810-LineAlreadyCompleted\",\r\n \"description\": \"Line is marked as completed. Patch operation can not be done on completed lines.\"\r\n },\r\n {\r\n \"code\": \"1811-LineAlreadyShippedExternalLink\",\r\n \"description\": \"Not possible to update External Link. Update only accepted for orders, where the updated line has not been shipped\"\r\n },\r\n {\r\n \"code\": \"1812-LineAlreadyShippedSalesAccountId\",\r\n \"description\": \"Not possible to update sales account id. Update only accepted for orders, where the updated line has not been shipped\"\r\n },\r\n {\r\n \"code\": \"1813-InputLinesExceedExistingLinesCount\",\r\n \"description\": \"The number of provided lines exceed existing sales order lines\"\r\n },\r\n {\r\n \"code\": \"1814-ReasonCodePrerequisitesNotMet\",\r\n \"description\": \"The reason code prerequisites for the line does not meet expectations\"\r\n },\r\n {\r\n \"code\": \"1815-SortOrderExceedLinesCount\",\r\n \"description\": \"Cannot set higher sort order number than the number of lines\"\r\n },\r\n {\r\n \"code\": \"1816-SortOrderNbrIsNotUnique\",\r\n \"description\": \"The SortOrder number provided is not unique in your request\"\r\n },\r\n {\r\n \"code\": \"1817-LineIdIsNotUnique\",\r\n \"description\": \"The LineId provided is not unique in your request\"\r\n },\r\n {\r\n \"code\": \"1818-LineAlreadyShippedUnitCost\",\r\n \"description\": \"Not possible to update Unit cost. Update only accepted for orders, where the updated line has not been shipped\"\r\n },\r\n {\r\n \"code\": \"1819-LineAlreadyShippedShippingRule\",\r\n \"description\": \"Not possible to update Shipping rule. Update only accepted for orders, where the updated line has not been shipped\"\r\n },\r\n {\r\n \"code\": \"1820-LineIsFreeItem\",\r\n \"description\": \"Cannot change discount fields for line that is marked as free item line\"\r\n },\r\n {\r\n \"code\": \"1821-InventoryIdFreeItemNotFound\",\r\n \"description\": \"InventoryId for a free Item cannot be found or is invalid\"\r\n },\r\n {\r\n \"code\": \"1822-CanNotUpdateLineLocation\",\r\n \"description\": \"Not possible to update warehouse for line with line number {0}. Update only accepted for orders in statuses Open, On hold, Back ordered, Credit hold and where the updated line has not been shipped and line is not completed.\"\r\n },\r\n {\r\n \"code\": \"1823-DeleteLineWhichIsAlreadyShipped\",\r\n \"description\": \"Cannot delete line that has been shipped\"\r\n },\r\n {\r\n \"code\": \"1824-DeleteLineWhichIsFreeDiscountLine\",\r\n \"description\": \"Cannot delete free item line set from a discount. Please review the discount\"\r\n },\r\n {\r\n \"code\": \"1825-DeleteSalesOrderWithShippedLines\",\r\n \"description\": \"Cannot delete order containing lines that have been shipped\"\r\n },\r\n {\r\n \"code\": \"1900-OrderNumberSequenceNotFound\",\r\n \"description\": \"Order number sequence cannot be found\"\r\n },\r\n {\r\n \"code\": \"1901-InactiveSalesPerson\",\r\n \"description\": \"Sales Person is not active\"\r\n },\r\n {\r\n \"code\": \"1902-SalesPersonNotFound\",\r\n \"description\": \"Sales Person is not found\"\r\n },\r\n {\r\n \"code\": \"1903-SupplierNotFound\",\r\n \"description\": \"Supplier not found or is not active\"\r\n },\r\n {\r\n \"code\": \"1904-ProjectNotFound\",\r\n \"description\": \"Project cannot be found\"\r\n },\r\n {\r\n \"code\": \"1905-ProjectNotVisibleInSO\",\r\n \"description\": \"Project is not accepted for use in a sales order\"\r\n },\r\n {\r\n \"code\": \"1906-ProjectCancelled\",\r\n \"description\": \"Project cannot be set because status is Cancelled\"\r\n },\r\n {\r\n \"code\": \"1907-ProjectCompleted\",\r\n \"description\": \"Project cannot be set because status is Completed\"\r\n },\r\n {\r\n \"code\": \"1908-ProjectTaskNotFound\",\r\n \"description\": \"Project task cannot be found\"\r\n },\r\n {\r\n \"code\": \"5000-InvalidAttributeFilter\",\r\n \"description\": \"Invalid attributeFilter\"\r\n },\r\n {\r\n \"code\": \"5001-InvalidAttributeName\",\r\n \"description\": \"The attribute name is invalid. Only characters, digits, or space is allowed\"\r\n },\r\n {\r\n \"code\": \"5002-BaseUnitDetailsNotSet\",\r\n \"description\": \"Base Unit details not set for unit\"\r\n }\r\n ]\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": []\r\n }\r\n ]\r\n}", "url": "https://salesorder.visma.net/swagger/v3/swagger.json", "output": null, "newLineBehavior": "Auto" @@ -33,8 +33,8 @@ "clientClassAccessModifier": "public", "typeAccessModifier": "public", "generateContractsOutput": true, - "contractsNamespace": "ONIT.VismaNetApi.SalesOrderV3.Models", - "contractsOutputFilePath": "Visma.net/SalesOrderV3/Models/Contracts.cs", + "contractsNamespace": "Visma.Net.SalesOrderNG.Models", + "contractsOutputFilePath": "Models/Contracts.cs", "parameterDateTimeFormat": "s", "parameterDateFormat": "yyyy-MM-dd", "generateUpdateJsonSerializerSettingsMethod": true, @@ -56,7 +56,7 @@ "wrapResponseMethods": [], "generateResponseClasses": true, "responseClass": "SwaggerResponse", - "namespace": "ONIT.VismaNetApi.SalesOrderV3", + "namespace": "Visma.Net.SalesOrderNG", "requiredPropertiesMustBeDefined": true, "dateType": "System.DateTimeOffset", "jsonConverters": null, @@ -93,7 +93,7 @@ "enumNameGeneratorType": null, "serviceHost": null, "serviceSchemes": null, - "output": "Visma.net/SalesOrderV3/ClientSalesOrderV3.cs", + "output": "ClientSalesOrderV3.cs", "newLineBehavior": "Auto" } } diff --git a/Visma.net/Dynamic/VismaNetDynamicHandler.cs b/Visma.net/Dynamic/VismaNetDynamicHandler.cs index 20236dd..5647134 100644 --- a/Visma.net/Dynamic/VismaNetDynamicHandler.cs +++ b/Visma.net/Dynamic/VismaNetDynamicHandler.cs @@ -6,7 +6,8 @@ namespace ONIT.VismaNetApi.Dynamic public abstract class VismaNetDynamicHandler : DynamicObject { protected VismaNetAuthorization Auth; - protected Visma.Net.SalesOrderNG.Helpers.VismaNetAuthorization AuthNG; + protected static Visma.Net.SalesOrderNG.Helpers.VismaNetAuthorization AuthNG; + public override bool TryGetMember(GetMemberBinder binder, out object result) { diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index 14da8ee..fee0980 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -4,7 +4,7 @@ Visma.net Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 - 4.2.1.1 + 4.2.1.7 netstandard2.0;net462;net6 Visma.net Copyright © ON IT AS 2014 - 2022 @@ -25,9 +25,10 @@ LICENSE.md on_it_logo.png README.md - 4.0.3.12 - 4.0.3.12 - + 4.2.1.7 + 4.2.1.7 + $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage + @@ -36,6 +37,7 @@ + @@ -51,6 +53,7 @@ True + @@ -58,6 +61,14 @@ - + + true + Visma.Net.SalesOrderNG.dll + + + + + + \ No newline at end of file diff --git a/Visma.net/VismaNet.cs b/Visma.net/VismaNet.cs index d5e5926..3838736 100644 --- a/Visma.net/VismaNet.cs +++ b/Visma.net/VismaNet.cs @@ -75,6 +75,7 @@ public class VismaNet : VismaNetDynamicHandler [Obsolete("Payment is deprecated, please use CustomerPayment instead.", true)] public readonly PaymentData Payment; + /// /// Creates a connection using token. /// @@ -99,17 +100,19 @@ public VismaNet(int companyId, string token, int branchId = 0, HttpClient httpCl VismaConnectScopes = VismaConnectScopes }; - AuthNG = new Visma.Net.SalesOrderNG.Helpers.VismaNetAuthorization - { - Token = token, - CompanyId = companyId, - BranchId = branchId, - HttpClient = httpClient, - VismaConnectClientId = VismaConnectClientId, - VismaConnectClientSecret = VismaConnectClientSecret, - VismaConnectTenantId = VismaConnectTenantId, - VismaConnectScopes = VismaConnectScopes - }; + + AuthNG = new Visma.Net.SalesOrderNG.Helpers.VismaNetAuthorization + { + Token = token, + CompanyId = companyId, + BranchId = branchId, + HttpClient = httpClient, + VismaConnectClientId = VismaConnectClientId, + VismaConnectClientSecret = VismaConnectClientSecret, + VismaConnectTenantId = VismaConnectTenantId, + VismaConnectScopes = VismaConnectScopes + }; + Attribute = new AttributeData(Auth); Customer = new CustomerData(Auth); @@ -235,7 +238,7 @@ public static async Task GetTokenUsingOAuth(string client_id, string cli { return await VismaNetApiHelper.GetTokenOAuth(client_id, client_secret, code, redirect_uri); } - public static async Task GetTokenFromVismaConnect(string clientId, string secret, string tenant_id, string scope = "vismanet_erp_service_api:create vismanet_erp_service_api:delete vismanet_erp_service_api:read vismanet_erp_service_api:update") + internal static async Task GetTokenFromVismaConnect(string clientId, string secret, string tenant_id, string scope = "vismanet_erp_service_api:create vismanet_erp_service_api:delete vismanet_erp_service_api:read vismanet_erp_service_api:update") { return await VismaNetApiHelper.GetTokenFromVismaConnect(clientId,secret,tenant_id,scope); } From 673495f358bb1a15318e09224f2a6e841030d48b Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Thu, 26 Oct 2023 16:23:44 +0200 Subject: [PATCH 21/37] Fix for asyncs --- Visma.net/lib/VismaNetWebClient.cs | 53 +++++++++++++++++------------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/Visma.net/lib/VismaNetWebClient.cs b/Visma.net/lib/VismaNetWebClient.cs index fa3f7a1..07c7933 100644 --- a/Visma.net/lib/VismaNetWebClient.cs +++ b/Visma.net/lib/VismaNetWebClient.cs @@ -94,7 +94,7 @@ internal VismaNetHttpClient(VismaNetAuthorization auth = null) _authorization = auth; } - internal HttpRequestMessage PrepareMessage(HttpMethod method, string resource) + internal async Task PrepareMessageAsync(HttpMethod method, string resource) { var message = new HttpRequestMessage(method, resource); if (_authorization != null) @@ -104,7 +104,7 @@ internal HttpRequestMessage PrepareMessage(HttpMethod method, string resource) // Check for token expired ( 5 minutes grace ) if (_authorization.VismaConnectToken == null || _authorization.VismaConnectTokenExpire.AddMinutes(-5) > DateTimeOffset.UtcNow) { - var vToken = VismaNetApiHelper.GetTokenFromVismaConnect(_authorization.VismaConnectClientId, _authorization.VismaConnectClientSecret, _authorization.VismaConnectTenantId, _authorization.VismaConnectScopes).Result; + var vToken = await VismaNetApiHelper.GetTokenFromVismaConnect(_authorization.VismaConnectClientId, _authorization.VismaConnectClientSecret, _authorization.VismaConnectTenantId, _authorization.VismaConnectScopes); _authorization.VismaConnectToken = vToken.access_token; _authorization.VismaConnectTokenExpire = vToken.expires_on; } @@ -137,7 +137,7 @@ internal HttpRequestMessage PrepareMessage(HttpMethod method, string resource) internal async Task ForEachInStream(string url, Func action) where T : DtoProviderBase { - using (var result = await HttpClient.SendAsync(PrepareMessage(HttpMethod.Get, url), + using (var result = await HttpClient.SendAsync(await PrepareMessageAsync(HttpMethod.Get, url), HttpCompletionOption.ResponseHeadersRead)) using (var stream = await result.Content.ReadAsStreamAsync()) using (var reader = new StreamReader(stream)) @@ -153,7 +153,7 @@ internal async Task ForEachInStream(string url, Func action) where T internal async Task Get(string url) { url = url.Replace("http://", "https://"); // force https - var result = await HttpClient.SendAsync(PrepareMessage(HttpMethod.Get, url)); + var result = await HttpClient.SendAsync(await PrepareMessageAsync(HttpMethod.Get, url)); var stringData = await result.Content.ReadAsStringAsync(); if (!result.IsSuccessStatusCode) { @@ -169,7 +169,7 @@ internal async Task Get(string url) internal async Task GetStream(string url) { url = url.Replace("http://", "https://"); // force https - var result = await HttpClient.SendAsync(PrepareMessage(HttpMethod.Get, url)); + var result = await HttpClient.SendAsync(await PrepareMessageAsync(HttpMethod.Get, url)); var streamData = await result.Content.ReadAsStreamAsync(); if (!result.IsSuccessStatusCode) VismaNetExceptionHandler.HandleException("Error downloading stream from Visma.net", null, null, url); @@ -178,7 +178,7 @@ internal async Task GetStream(string url) internal async Task PostMessage(string url, HttpContent httpContent) where T : class { - var message = PrepareMessage(HttpMethod.Post, url); + var message = await PrepareMessageAsync(HttpMethod.Post, url); message.Content = httpContent; var result = await HttpClient.SendAsync(message); if (!result.IsSuccessStatusCode) @@ -199,35 +199,44 @@ internal async Task PostMessage(string url, HttpContent httpContent) where internal async Task PostMessageVismaConnect(string url, HttpContent httpContent) { - var message = PrepareMessage(HttpMethod.Post, url); + //var message = PrepareMessage(HttpMethod.Post, url); + var message = new HttpRequestMessage(HttpMethod.Post, url); message.Content = httpContent; - var result = await HttpClient.SendAsync(message); - string content = await result.Content.ReadAsStringAsync(); - JObject jsonObj = null; - if (!string.IsNullOrEmpty(content)) - jsonObj = JsonConvert.DeserializeObject(content); - - if (!result.IsSuccessStatusCode) + try { + var result = await HttpClient.SendAsync(message); + string content = await result.Content.ReadAsStringAsync(); + JObject jsonObj = null; if (!string.IsNullOrEmpty(content)) + jsonObj = JsonConvert.DeserializeObject(content); + + if (!result.IsSuccessStatusCode) { - throw new VismaConnectException($"Error: {jsonObj["error"].Value()}, statuscode: {(int)result.StatusCode} {result.ReasonPhrase}", content); + if (!string.IsNullOrEmpty(content)) + { + throw new VismaConnectException($"Error: {jsonObj["error"].Value()}, statuscode: {(int)result.StatusCode} {result.ReasonPhrase}", content); + } + else + { + throw new VismaConnectException($"Unknown error, statuscode: {(int)result.StatusCode} {result.ReasonPhrase}"); + } + } else { - throw new VismaConnectException($"Unknown error, statuscode: {(int)result.StatusCode} {result.ReasonPhrase}"); + return jsonObj; } - } - else + catch (Exception ex) { - return jsonObj; + throw new Exception($"Error: {ex.Message}, statuscode: {ex.HResult} {ex.InnerException.Message}"); } + } internal async Task Post(string url, object data, string urlToGet = null, bool ignoreAbsoluteUri = false, string erpApiBackground = null) { - using (var message = PrepareMessage(HttpMethod.Post, url)) + using (var message = await PrepareMessageAsync(HttpMethod.Post, url)) { if (!string.IsNullOrEmpty(erpApiBackground)) { @@ -280,7 +289,7 @@ internal async Task Post(string url, object data, string urlToGet = null, internal async Task Put(string url, object data, string urlToGet = null, bool ignoreAbsoluteUri = false, string erpApiBackground = null) { - using (var message = PrepareMessage(HttpMethod.Put, url)) + using (var message = await PrepareMessageAsync(HttpMethod.Put, url)) { if (!string.IsNullOrEmpty(erpApiBackground)) { @@ -340,7 +349,7 @@ internal static IEnumerable DeserializeSequenceFromJson(TextReader readerS public async Task Delete(string url) { - var message = PrepareMessage(HttpMethod.Delete, url); + var message = await PrepareMessageAsync(HttpMethod.Delete, url); var result = await HttpClient.SendAsync(message); return result.StatusCode == HttpStatusCode.NoContent; } From 1af0f732b70f7feb09646706f75686f2b118074e Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Thu, 26 Oct 2023 16:28:17 +0200 Subject: [PATCH 22/37] 4.2.1.9 --- Visma.net/Visma.net.csproj | 6 +++--- Visma.net/VismaNet.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index fee0980..bb6bfed 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -4,7 +4,7 @@ Visma.net Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 - 4.2.1.7 + 4.2.1.9 netstandard2.0;net462;net6 Visma.net Copyright © ON IT AS 2014 - 2022 @@ -25,8 +25,8 @@ LICENSE.md on_it_logo.png README.md - 4.2.1.7 - 4.2.1.7 + 4.2.1.9 + 4.2.1.9 $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage diff --git a/Visma.net/VismaNet.cs b/Visma.net/VismaNet.cs index 3838736..62a9d7a 100644 --- a/Visma.net/VismaNet.cs +++ b/Visma.net/VismaNet.cs @@ -238,7 +238,7 @@ public static async Task GetTokenUsingOAuth(string client_id, string cli { return await VismaNetApiHelper.GetTokenOAuth(client_id, client_secret, code, redirect_uri); } - internal static async Task GetTokenFromVismaConnect(string clientId, string secret, string tenant_id, string scope = "vismanet_erp_service_api:create vismanet_erp_service_api:delete vismanet_erp_service_api:read vismanet_erp_service_api:update") + public static async Task GetTokenFromVismaConnect(string clientId, string secret, string tenant_id, string scope = "vismanet_erp_service_api:create vismanet_erp_service_api:delete vismanet_erp_service_api:read vismanet_erp_service_api:update") { return await VismaNetApiHelper.GetTokenFromVismaConnect(clientId,secret,tenant_id,scope); } From 838dac51cc9d04a1e8841a109ad9cf2c8c45338a Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Fri, 27 Oct 2023 16:19:20 +0200 Subject: [PATCH 23/37] Added fields to CustomerINvoiceLine --- Visma.net/Models/CustomerInvoiceLine.cs | 15 +++++++++++++++ Visma.net/Visma.net.csproj | 6 +++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Visma.net/Models/CustomerInvoiceLine.cs b/Visma.net/Models/CustomerInvoiceLine.cs index dc190c9..582dedf 100644 --- a/Visma.net/Models/CustomerInvoiceLine.cs +++ b/Visma.net/Models/CustomerInvoiceLine.cs @@ -225,6 +225,21 @@ public decimal unitPrice private set; // { Set(value); } } + [JsonProperty] + public string soOrderType + { + get; + private set; + } + + [JsonProperty] + public string soOrderNbr + { + get; + private set; + } + + public decimal unitPriceInCurrency { get => Get(); diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index bb6bfed..a14b46d 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -4,7 +4,7 @@ Visma.net Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 - 4.2.1.9 + 4.2.1.10 netstandard2.0;net462;net6 Visma.net Copyright © ON IT AS 2014 - 2022 @@ -25,8 +25,8 @@ LICENSE.md on_it_logo.png README.md - 4.2.1.9 - 4.2.1.9 + 4.2.1.10 + 4.2.1.10 $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage From 0f7c9d550c35f0f21f34cf6bbcf3a334f8151bbc Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Thu, 16 Nov 2023 11:19:18 +0100 Subject: [PATCH 24/37] Added fields to invoice --- Visma.net/Models/CustomerInvoice.cs | 16 ++++++++++++++++ Visma.net/Visma.net.csproj | 6 +++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Visma.net/Models/CustomerInvoice.cs b/Visma.net/Models/CustomerInvoice.cs index 8ff7ddc..cf55e43 100644 --- a/Visma.net/Models/CustomerInvoice.cs +++ b/Visma.net/Models/CustomerInvoice.cs @@ -305,6 +305,22 @@ public string referenceNumber set => Set(value); } + public string accountingCostRef + { + get => Get(); + set => Set(value); + } + public string originatorDocRef + { + get => Get(); + set => Set(value); + } + public string contractDocRef + { + get => Get(); + set => Set(value); + } + [JsonProperty] public DescriptiveDto salesPerson { diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index a14b46d..0f4ca14 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -4,7 +4,7 @@ Visma.net Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 - 4.2.1.10 + 4.2.1.11 netstandard2.0;net462;net6 Visma.net Copyright © ON IT AS 2014 - 2022 @@ -25,8 +25,8 @@ LICENSE.md on_it_logo.png README.md - 4.2.1.10 - 4.2.1.10 + 4.2.1.11 + 4.2.1.11 $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage From a4423b0faa022aad3f96a6a835e74185ddc1fba8 Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Wed, 27 Dec 2023 10:40:45 +0100 Subject: [PATCH 25/37] Fix for token --- Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs | 4 ++++ Visma.net/Visma.net.csproj | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs b/Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs index b7dac3c..290d0e6 100644 --- a/Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs +++ b/Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs @@ -84,6 +84,10 @@ private void AddVismaNetAuth(HttpRequestMessage request) } request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", _authorization.VismaConnectToken); } + else if (_authorization.Token != null) + { + request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", _authorization.Token); + } else { throw new VismaNetExceptionClientIdMissing(); diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index a5969ae..0f4ca14 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -5,7 +5,6 @@ Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 4.2.1.11 - 4.1.0.2 netstandard2.0;net462;net6 Visma.net Copyright © ON IT AS 2014 - 2022 @@ -30,9 +29,6 @@ 4.2.1.11 $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage - 4.0.3.11 - 4.0.3.11 - From d668977b47306befb27909190e50e57e90762ce7 Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Wed, 27 Dec 2023 10:42:16 +0100 Subject: [PATCH 26/37] More fix --- Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs b/Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs index 290d0e6..a6da676 100644 --- a/Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs +++ b/Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs @@ -84,7 +84,7 @@ private void AddVismaNetAuth(HttpRequestMessage request) } request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", _authorization.VismaConnectToken); } - else if (_authorization.Token != null) + else if (!string.IsNullOrEmpty(_authorization.Token)) { request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", _authorization.Token); } From cae2b69d9fdf8dda90cb2c3c55834b80e50b5f00 Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Wed, 27 Dec 2023 10:49:21 +0100 Subject: [PATCH 27/37] Scope check fix --- .../ClientSalesOrderV3.Extensions.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs b/Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs index a6da676..b4e7b43 100644 --- a/Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs +++ b/Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs @@ -63,7 +63,21 @@ public ClientSalesOrderV3(Helpers.VismaNetAuthorization auth, string Application partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder) { urlBuilder.Insert(0, VismaNetControllers.SalesOrderV3BaseUrl); - var jwtToken = new JwtSecurityToken(_authorization.Token); + JwtSecurityToken jwtToken = null; + if (!string.IsNullOrEmpty(_authorization.Token)) + { + jwtToken = new JwtSecurityToken(_authorization.Token); + } + else if (!string.IsNullOrEmpty(_authorization.VismaConnectToken)) + { + jwtToken = new JwtSecurityToken(_authorization.VismaConnectToken); + } + else + { + throw new VismaConnectException("No token found"); + } + + if (!_authorization.VismaConnectScopes.Contains("visma.net.erp.salesorder") && !jwtToken.Claims.Any(c => c.Value.Contains("visma.net.erp.salesorder"))) { throw new VismaConnectException("Scope has to contain visma.net.erp.salesorder scopes to use SalesOrderV3"); From 00df39b82bbd60b59bf72bc52df8d16eebca3f1a Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Wed, 27 Dec 2023 10:53:40 +0100 Subject: [PATCH 28/37] Scopes again --- Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs b/Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs index b4e7b43..4632b4b 100644 --- a/Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs +++ b/Visma.Net.SalesOrderNG/ClientSalesOrderV3.Extensions.cs @@ -63,6 +63,8 @@ public ClientSalesOrderV3(Helpers.VismaNetAuthorization auth, string Application partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder) { urlBuilder.Insert(0, VismaNetControllers.SalesOrderV3BaseUrl); + AddVismaNetAuth(request); + JwtSecurityToken jwtToken = null; if (!string.IsNullOrEmpty(_authorization.Token)) { @@ -82,7 +84,7 @@ partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.H { throw new VismaConnectException("Scope has to contain visma.net.erp.salesorder scopes to use SalesOrderV3"); } - AddVismaNetAuth(request); + } private void AddVismaNetAuth(HttpRequestMessage request) From 0a669dfb86a9a5e8a2fa0447388c52c7c816be3f Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Thu, 8 Feb 2024 08:26:38 +0100 Subject: [PATCH 29/37] Update Etag for OrderV3 and addAttchmentInventory --- Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs | 7 +++--- Visma.net/Visma.net.csproj | 6 ++--- Visma.net/lib/Data/InventoryData.cs | 24 ++++++++++++++++++++ Visma.net/lib/VismaNetApiHelper.cs | 17 ++++++++++++++ 4 files changed, 48 insertions(+), 6 deletions(-) diff --git a/Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs b/Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs index 0166583..8cfb3eb 100644 --- a/Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs +++ b/Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs @@ -792,9 +792,9 @@ public virtual async System.Threading.Tasks.Task SalesOrders_Pa /// The order number to delete /// The order was deleted successfully /// A server side error occurred. - public virtual System.Threading.Tasks.Task SalesOrders_Delete_typeorderIdAsync(string type, string orderId) + public virtual System.Threading.Tasks.Task SalesOrders_Delete_typeorderIdAsync(string type, string orderId, string EtagVersion) { - return SalesOrders_Delete_typeorderIdAsync(type, orderId, System.Threading.CancellationToken.None); + return SalesOrders_Delete_typeorderIdAsync(type, orderId, EtagVersion, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. @@ -809,7 +809,7 @@ public virtual System.Threading.Tasks.Task SalesOrders_Delete_t /// The order number to delete /// The order was deleted successfully /// A server side error occurred. - public virtual async System.Threading.Tasks.Task SalesOrders_Delete_typeorderIdAsync(string type, string orderId, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task SalesOrders_Delete_typeorderIdAsync(string type, string orderId,string EtagVersion, System.Threading.CancellationToken cancellationToken) { if (type == null) throw new System.ArgumentNullException("type"); @@ -831,6 +831,7 @@ public virtual async System.Threading.Tasks.Task SalesOrders_De request_.Method = new System.Net.Http.HttpMethod("DELETE"); PrepareRequest(client_, request_, urlBuilder_); + request_.Headers.Add("If-Match", EtagVersion); var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index 0f4ca14..4040ea4 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -4,7 +4,7 @@ Visma.net Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 - 4.2.1.11 + 4.2.1.15 netstandard2.0;net462;net6 Visma.net Copyright © ON IT AS 2014 - 2022 @@ -25,8 +25,8 @@ LICENSE.md on_it_logo.png README.md - 4.2.1.11 - 4.2.1.11 + 4.2.1.15 + 4.2.1.15 $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage diff --git a/Visma.net/lib/Data/InventoryData.cs b/Visma.net/lib/Data/InventoryData.cs index 53d82c0..df9aa20 100644 --- a/Visma.net/lib/Data/InventoryData.cs +++ b/Visma.net/lib/Data/InventoryData.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Collections.Specialized; +using System.IO; using System.Threading.Tasks; namespace ONIT.VismaNetApi.Lib.Data @@ -48,5 +49,28 @@ public async Task> GetAllItemClasses() { return await VismaNetApiHelper.GetAllItemClasses(Authorization); } + + public async Task AddAttachmentToInventory(string inventoryNumber, byte[] byteArray, string fileName) + { + if (byteArray == default(byte[])) + throw new ArgumentNullException(nameof(byteArray), "ByteArray is missing"); + if (string.IsNullOrEmpty(fileName) || string.IsNullOrEmpty(Path.GetExtension(fileName))) + throw new ArgumentNullException(nameof(fileName), "File name must be provided and have an extention"); + return await VismaNetApiHelper.AddAttachmentToInventory(Authorization, inventoryNumber, byteArray, fileName); + } + + public async Task AddAttachmentToInventory(string inventoryNumber, Stream stream, string fileName) + { + if (stream == default(Stream)) + throw new ArgumentNullException(nameof(stream), "Stream is missing"); + if (string.IsNullOrEmpty(fileName) || string.IsNullOrEmpty(Path.GetExtension(fileName))) + throw new ArgumentNullException(nameof(fileName), "File name must be provided and have an extention"); + + using (var memoryStream = new MemoryStream()) + { + stream.CopyTo(memoryStream); + return await VismaNetApiHelper.AddAttachmentToInventory(Authorization, inventoryNumber, stream, fileName); + } + } } } \ No newline at end of file diff --git a/Visma.net/lib/VismaNetApiHelper.cs b/Visma.net/lib/VismaNetApiHelper.cs index 54eba62..fc56448 100644 --- a/Visma.net/lib/VismaNetApiHelper.cs +++ b/Visma.net/lib/VismaNetApiHelper.cs @@ -199,6 +199,22 @@ internal static Task AddAttachmentToInvoice(VismaNetAuthorization auth, return AddAttachmentToController(auth, url, stream, fileName); } + internal static Task AddAttachmentToInventory(VismaNetAuthorization auth, string inventoryNumber, + byte[] bytes, + string fileName) + { + var url = GetApiUrlForController(VismaNetControllers.Inventory, $"/{inventoryNumber}/attachment"); + return AddAttachmentToController(auth, url, bytes, fileName); + } + + internal static Task AddAttachmentToInventory(VismaNetAuthorization auth, string inventoryNumber, + Stream stream, + string fileName) + { + var url = GetApiUrlForController(VismaNetControllers.Inventory, $"/{inventoryNumber}/attachment"); + return AddAttachmentToController(auth, url, stream, fileName); + } + internal static Task AddAttachmentToCreditNote(VismaNetAuthorization auth, string number, byte[] bytes, string fileName) @@ -232,6 +248,7 @@ internal static Task AddAttachmentToJournalTransaction(VismaNetAuthoriza var url = GetApiUrlForController(VismaNetControllers.JournalTransactionV2, $"/module/{module.ToString().Substring(6)}/{batch}/attachment"); return AddAttachmentToController(auth, url, bytes, fileName); } + internal static string AppendToQuery(string query, string key, object value) { From 4d8b7d94caa2c2e20c755b9509ba4e3ada333aaa Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Mon, 8 Apr 2024 10:49:33 +0200 Subject: [PATCH 30/37] Fixed to customer --- .../Models/CustomDto/CustomerGLAccountDto.cs | 59 +++++++++++++++---- Visma.net/Models/Customer.cs | 5 +- Visma.net/Visma.net.csproj | 6 +- 3 files changed, 53 insertions(+), 17 deletions(-) diff --git a/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs b/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs index ee5c28c..11e86d6 100644 --- a/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs +++ b/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs @@ -4,44 +4,77 @@ namespace ONIT.VismaNetApi.Models.CustomDto { - public class CustomerGLAccountDto + public class CustomerGLAccountDto : DtoProviderBase { - [JsonProperty] public GLAccountDetailsDto customerLedgerAccount { get; private set; } - [JsonProperty] public SubaccountGlAccount customerLedgerSubAccount { get; private set; } - [JsonProperty] public GLAccountDetailsDto salesAccount { get; private set; } + [JsonProperty] public GLAccountDetailsDto customerLedgerAccount + { + get => Get(defaultValue: new GLAccountDetailsDto()); + private set => Set(value); + } - [JsonProperty] public GLAccountDetailsDto salesEuAccount { get; private set; } + [JsonProperty] public SubaccountGlAccount customerLedgerSubAccount + { + get => Get(defaultValue: new SubaccountGlAccount()); + private set => Set(value); + } + [JsonProperty] public GLAccountDetailsDto salesAccount + { + get => Get(defaultValue: new GLAccountDetailsDto()); + private set => Set(value); + } + + [JsonProperty] public GLAccountDetailsDto salesEuAccount + { + get => Get(defaultValue: new GLAccountDetailsDto()); + private set => Set(value); + } - [JsonProperty] public GLAccountDetailsDto salesExportAccount { get; private set; } - [JsonProperty] public GLAccountDetailsDto salesNonTaxableAccount { get; private set; } + [JsonProperty] public GLAccountDetailsDto salesExportAccount + { + get => Get(defaultValue: new GLAccountDetailsDto()); + private set => Set(value); + } + + + [JsonProperty] public GLAccountDetailsDto salesNonTaxableAccount + { + get => Get(defaultValue: new GLAccountDetailsDto()); + private set => Set(value); + } + + + [JsonProperty] public SubaccountGlAccount salesSubaccount + { + get => Get(defaultValue: new SubaccountGlAccount()); + private set => Set(value); + } - [JsonProperty] public SubaccountGlAccount salesSubaccount { get; private set; } } public class SupplierGLAccountDto : DtoProviderBase { [JsonProperty] public GLAccountDetailsDto supplierAccount { - get => Get(); + get => Get(defaultValue: new GLAccountDetailsDto()); private set => Set(value); } [JsonProperty] public GLAccountDetailsDto expenseAccount { - get => Get(); + get => Get(defaultValue: new GLAccountDetailsDto()); private set => Set(value); } [JsonProperty] public GLAccountDetailsDto expenseAccountNonTax { - get => Get(); + get => Get(defaultValue: new GLAccountDetailsDto()); private set => Set(value); } [JsonProperty] public GLAccountDetailsDto expenseEUAccount { - get => Get(); + get => Get(defaultValue: new GLAccountDetailsDto()); private set => Set(value); } [JsonProperty] public GLAccountDetailsDto expenseAccountImport { - get => Get(); + get => Get(defaultValue: new GLAccountDetailsDto()); private set => Set(value); } diff --git a/Visma.net/Models/Customer.cs b/Visma.net/Models/Customer.cs index 27d16ea..29aa453 100644 --- a/Visma.net/Models/Customer.cs +++ b/Visma.net/Models/Customer.cs @@ -111,7 +111,10 @@ public List directDebitLines [JsonProperty] public JObject extras { get; private set; } - [JsonProperty] public CustomerGLAccountDto glAccounts { get; private set; } + [JsonProperty] public CustomerGLAccountDto glAccounts { + get => Get(defaultValue: new CustomerGLAccountDto()); + private set => Set(value); + } [JsonProperty] public int internalId { get; private set; } diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index 4040ea4..c4cc1b2 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -4,7 +4,7 @@ Visma.net Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 - 4.2.1.15 + 4.2.1.17 netstandard2.0;net462;net6 Visma.net Copyright © ON IT AS 2014 - 2022 @@ -25,8 +25,8 @@ LICENSE.md on_it_logo.png README.md - 4.2.1.15 - 4.2.1.15 + 4.2.1.17 + 4.2.1.17 $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage From 167dc7f6bf3ccf405c5da72044c98a6191df3f62 Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Wed, 10 Apr 2024 08:39:06 +0200 Subject: [PATCH 31/37] Kititem and supplieraccount --- Visma.net/Models/CustomDto/CustomerGLAccountDto.cs | 8 ++++++++ Visma.net/Models/Inventory.cs | 12 ++++++++++++ Visma.net/Visma.net.csproj | 6 +++--- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs b/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs index 11e86d6..c6b0f46 100644 --- a/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs +++ b/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs @@ -58,6 +58,12 @@ [JsonProperty] public GLAccountDetailsDto supplierAccount { get => Get(defaultValue: new GLAccountDetailsDto()); private set => Set(value); } + [JsonProperty] + public IdDescription supplierSubaccount + { + get => Get(); + private set => Set(value); + } [JsonProperty] public GLAccountDetailsDto expenseAccount { get => Get(defaultValue: new GLAccountDetailsDto()); @@ -83,6 +89,8 @@ [JsonProperty] public IdDescription expenseSubaccount { private set => Set(value); } + + public DtoValue ToDto() { return new DtoValue(this); diff --git a/Visma.net/Models/Inventory.cs b/Visma.net/Models/Inventory.cs index ddea572..f7ca782 100644 --- a/Visma.net/Models/Inventory.cs +++ b/Visma.net/Models/Inventory.cs @@ -138,6 +138,18 @@ public string body get => Get(); set => Set(value); } + [JsonProperty] + public bool stockItem + { + get => Get(); + private set => Set(value); + } + public bool kitItem + { + get => Get(); + set => Set(value); + } + public DescriptiveDto priceClass { diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index c4cc1b2..e339b96 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -4,7 +4,7 @@ Visma.net Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 - 4.2.1.17 + 4.2.1.18 netstandard2.0;net462;net6 Visma.net Copyright © ON IT AS 2014 - 2022 @@ -25,8 +25,8 @@ LICENSE.md on_it_logo.png README.md - 4.2.1.17 - 4.2.1.17 + 4.2.1.18 + 4.2.1.18 $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage From 0aa07685820829b6d5a73a3a4e717e918155916e Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Mon, 20 May 2024 15:49:39 +0200 Subject: [PATCH 32/37] Added rot/rut salesorder V3 --- Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs | 700 +++++++++++------- Visma.Net.SalesOrderNG/Models/Contracts.cs | 476 +++++++++--- .../Models/CustomDto/CustomerGLAccountDto.cs | 2 +- Visma.net/Visma.net.csproj | 6 +- 4 files changed, 811 insertions(+), 373 deletions(-) diff --git a/Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs b/Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs index 8cfb3eb..0d0c248 100644 --- a/Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs +++ b/Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs @@ -1,6 +1,6 @@ //---------------------- // -// Generated using the NSwag toolchain v13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0)) (http://NSwag.org) +// Generated using the NSwag toolchain v14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) // //---------------------- @@ -16,22 +16,26 @@ #pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" #pragma warning disable 8603 // Disable "CS8603 Possible null reference return" #pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" +#pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type" namespace Visma.Net.SalesOrderNG { using System = global::System; - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class ClientSalesOrderV3 { - private System.Lazy _settings; + #pragma warning disable 8618 + private string _baseUrl; + #pragma warning restore 8618 + + private static System.Lazy _settings = new System.Lazy(CreateSerializerSettings, true); public ClientSalesOrderV3() { - _settings = new System.Lazy(CreateSerializerSettings, true); } - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() + private static Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() { var settings = new Newtonsoft.Json.JsonSerializerSettings(); UpdateJsonSerializerSettings(settings); @@ -40,49 +44,46 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); + static partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); /// - /// Gets a list of locations for the specified customer + /// Gets a list of customers /// /// - /// Sample rquest: + /// Sample request: ///
- ///
GET /customers/10000/locations + ///
GET /customers?filter=visma&pageSize=10 ///
- /// The customer id (CustomerCd) to retrieve locations for - /// List of locations for the specified customer + /// An optional text string to find customers matching (searching fields id, name, gln, tax registration id). If not specified all customers are returned. + /// The number of customers retrieved per page. If not specified, the default value of 100 will be used. + /// The zero based page index to retrieve + /// Returns the list of customers found /// A server side error occurred. - public virtual System.Threading.Tasks.Task>> Customers_GetCustomerLocationList_customerIdlocationsAsync(string customerId) + public virtual System.Threading.Tasks.Task> Customers_GetList_Async(string filter, int? pageSize, int? pageIndex) { - return Customers_GetCustomerLocationList_customerIdlocationsAsync(customerId, System.Threading.CancellationToken.None); + return Customers_GetList_Async(filter, pageSize, pageIndex, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// - /// Gets a list of locations for the specified customer + /// Gets a list of customers /// /// - /// Sample rquest: + /// Sample request: ///
- ///
GET /customers/10000/locations + ///
GET /customers?filter=visma&pageSize=10 ///
- /// The customer id (CustomerCd) to retrieve locations for - /// List of locations for the specified customer + /// An optional text string to find customers matching (searching fields id, name, gln, tax registration id). If not specified all customers are returned. + /// The number of customers retrieved per page. If not specified, the default value of 100 will be used. + /// The zero based page index to retrieve + /// Returns the list of customers found /// A server side error occurred. - public virtual async System.Threading.Tasks.Task>> Customers_GetCustomerLocationList_customerIdlocationsAsync(string customerId, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task> Customers_GetList_Async(string filter, int? pageSize, int? pageIndex, System.Threading.CancellationToken cancellationToken) { - if (customerId == null) - throw new System.ArgumentNullException("customerId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/v3/Customers/{customerId}/locations"); - urlBuilder_.Replace("{customerId}", System.Uri.EscapeDataString(ConvertToString(customerId, System.Globalization.CultureInfo.InvariantCulture))); - var client_ = new System.Net.Http.HttpClient(); var disposeClient_ = true; try @@ -92,6 +93,25 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + var urlBuilder_ = new System.Text.StringBuilder(); + + // Operation Path: "api/v3/Customers" + urlBuilder_.Append("api/v3/Customers"); + urlBuilder_.Append('?'); + if (filter != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("filter")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(filter, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (pageSize != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("pageSize")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (pageIndex != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("pageIndex")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(pageIndex, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); @@ -103,7 +123,9 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() var disposeResponse_ = true; try { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -115,22 +137,22 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } - return new SwaggerResponse>(status_, headers_, objectResponse_.Object); + return new SwaggerResponse(status_, headers_, objectResponse_.Object); } else - if (status_ == 404) + if (status_ == 400) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } - throw new ApiException("If customer with id customerId is not found or is not accessible", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + throw new ApiException("If pageSize or pageIndex is not within the allowed range", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else if (status_ == 401) @@ -165,54 +187,37 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() } /// - /// Gets a list of customers + /// Gets a list of locations for the specified customer /// /// /// Sample request: ///
- ///
GET /customers?filter=visma&pageSize=10 + ///
GET /customers/10000/locations ///
- /// An optional text string to find customers matching (searching fields id, name, gln, tax registration id). If not specified all customers are returned. - /// The number of customers retrieved per page. If not specified, the default value of 100 will be used. - /// The zero based page index to retrieve - /// Returns the list of customers found + /// The customer id (CustomerCd) to retrieve locations for + /// List of locations for the specified customer /// A server side error occurred. - public virtual System.Threading.Tasks.Task> Customers_GetList_Async(string filter, int? pageSize, int? pageIndex) + public virtual System.Threading.Tasks.Task>> Customers_GetCustomerLocationList_customerIdlocationsAsync(string customerId) { - return Customers_GetList_Async(filter, pageSize, pageIndex, System.Threading.CancellationToken.None); + return Customers_GetCustomerLocationList_customerIdlocationsAsync(customerId, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// - /// Gets a list of customers + /// Gets a list of locations for the specified customer /// /// /// Sample request: ///
- ///
GET /customers?filter=visma&pageSize=10 + ///
GET /customers/10000/locations ///
- /// An optional text string to find customers matching (searching fields id, name, gln, tax registration id). If not specified all customers are returned. - /// The number of customers retrieved per page. If not specified, the default value of 100 will be used. - /// The zero based page index to retrieve - /// Returns the list of customers found + /// The customer id (CustomerCd) to retrieve locations for + /// List of locations for the specified customer /// A server side error occurred. - public virtual async System.Threading.Tasks.Task> Customers_GetList_Async(string filter, int? pageSize, int? pageIndex, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task>> Customers_GetCustomerLocationList_customerIdlocationsAsync(string customerId, System.Threading.CancellationToken cancellationToken) { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/v3/Customers?"); - if (filter != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (pageSize != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("pageSize") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (pageIndex != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("pageIndex") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageIndex, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; + if (customerId == null) + throw new System.ArgumentNullException("customerId"); var client_ = new System.Net.Http.HttpClient(); var disposeClient_ = true; @@ -223,6 +228,13 @@ public virtual async System.Threading.Tasks.Task h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -246,22 +260,22 @@ public virtual async System.Threading.Tasks.Task(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } - return new SwaggerResponse(status_, headers_, objectResponse_.Object); + return new SwaggerResponse>(status_, headers_, objectResponse_.Object); } else - if (status_ == 400) + if (status_ == 404) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } - throw new ApiException("If pageSize or pageIndex is not within the allowed range", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + throw new ApiException("If customer with id customerId is not found or is not accessible", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else if (status_ == 401) @@ -303,7 +317,10 @@ public virtual async System.Threading.Tasks.Task ///
GET /inventory?inventoryId=Item1 ///
- ///
GET /inventory?warehouseId=MAIN&modifiedSince=2021-08-01T12:00:00&pageSize=1000 + ///
GET /inventory?warehouseId=MAIN&modifiedSince=2021-08-01T12:00:00&modifiedSinceCondition=>&pageSize=1000 + ///
+ ///
If modifiedSinceCondition is not specified, it defaults to >=. + ///
If modifiedSince is not specified, it defaults to 1900-01-01. ///
///
GET /inventory?inventoryId=Item1&InventoryId=Item2&expand=location,attribute ///
@@ -313,6 +330,7 @@ public virtual async System.Threading.Tasks.TaskA list of zero or more warehouses to get a summary for. If no warehouse is supplied, all warehouses will be included in the response. /// A list of zero or more locations to get a summary for. If no location is supplied, all locations will be included in the response. /// An additional option to include location detail information with the warehouse summary, or attribute details for the inventory item. If this is not supplied, location information or attributes will not be included in the response. + /// Condition used in filtering when an inventory item's warehouse or location availability last changed /// A date/time value for filtering when an inventory item's warehouse or location availability last changed ///
Unless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone. /// One or more attribute filter values specified as attribute-id:attribute-value. For example "attributeFilter=WEBSHOP:1&attributeFilter=AnotherAttribute:someValue" @@ -321,9 +339,9 @@ public virtual async System.Threading.Tasks.TaskGets or sets the zero based page index to get /// Returns list of inventory items found /// A server side error occurred. - public virtual System.Threading.Tasks.Task> Inventory_GetList_Async(System.Collections.Generic.IEnumerable inventoryId, System.Collections.Generic.IEnumerable warehouseId, System.Collections.Generic.IEnumerable locationId, System.Collections.Generic.IEnumerable expand, System.DateTimeOffset? modifiedSince, System.Collections.Generic.IEnumerable attributeFilter, int? pageSize, int? pageIndex) + public virtual System.Threading.Tasks.Task> Inventory_GetList_Async(System.Collections.Generic.IEnumerable inventoryId, System.Collections.Generic.IEnumerable warehouseId, System.Collections.Generic.IEnumerable locationId, System.Collections.Generic.IEnumerable expand, string modifiedSinceCondition, System.DateTimeOffset? modifiedSince, System.Collections.Generic.IEnumerable attributeFilter, int? pageSize, int? pageIndex) { - return Inventory_GetList_Async(inventoryId, warehouseId, locationId, expand, modifiedSince, attributeFilter, pageSize, pageIndex, System.Threading.CancellationToken.None); + return Inventory_GetList_Async(inventoryId, warehouseId, locationId, expand, modifiedSinceCondition, modifiedSince, attributeFilter, pageSize, pageIndex, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. @@ -335,7 +353,10 @@ public virtual System.Threading.Tasks.Task ///
GET /inventory?inventoryId=Item1 ///
- ///
GET /inventory?warehouseId=MAIN&modifiedSince=2021-08-01T12:00:00&pageSize=1000 + ///
GET /inventory?warehouseId=MAIN&modifiedSince=2021-08-01T12:00:00&modifiedSinceCondition=>&pageSize=1000 + ///
+ ///
If modifiedSinceCondition is not specified, it defaults to >=. + ///
If modifiedSince is not specified, it defaults to 1900-01-01. ///
///
GET /inventory?inventoryId=Item1&InventoryId=Item2&expand=location,attribute ///
@@ -345,6 +366,7 @@ public virtual System.Threading.Tasks.TaskA list of zero or more warehouses to get a summary for. If no warehouse is supplied, all warehouses will be included in the response. /// A list of zero or more locations to get a summary for. If no location is supplied, all locations will be included in the response. /// An additional option to include location detail information with the warehouse summary, or attribute details for the inventory item. If this is not supplied, location information or attributes will not be included in the response. + /// Condition used in filtering when an inventory item's warehouse or location availability last changed /// A date/time value for filtering when an inventory item's warehouse or location availability last changed ///
Unless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone. /// One or more attribute filter values specified as attribute-id:attribute-value. For example "attributeFilter=WEBSHOP:1&attributeFilter=AnotherAttribute:someValue" @@ -353,44 +375,8 @@ public virtual System.Threading.Tasks.TaskGets or sets the zero based page index to get /// Returns list of inventory items found /// A server side error occurred. - public virtual async System.Threading.Tasks.Task> Inventory_GetList_Async(System.Collections.Generic.IEnumerable inventoryId, System.Collections.Generic.IEnumerable warehouseId, System.Collections.Generic.IEnumerable locationId, System.Collections.Generic.IEnumerable expand, System.DateTimeOffset? modifiedSince, System.Collections.Generic.IEnumerable attributeFilter, int? pageSize, int? pageIndex, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task> Inventory_GetList_Async(System.Collections.Generic.IEnumerable inventoryId, System.Collections.Generic.IEnumerable warehouseId, System.Collections.Generic.IEnumerable locationId, System.Collections.Generic.IEnumerable expand, string modifiedSinceCondition, System.DateTimeOffset? modifiedSince, System.Collections.Generic.IEnumerable attributeFilter, int? pageSize, int? pageIndex, System.Threading.CancellationToken cancellationToken) { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/v3/Inventory?"); - if (inventoryId != null) - { - foreach (var item_ in inventoryId) { urlBuilder_.Append(System.Uri.EscapeDataString("inventoryId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (warehouseId != null) - { - foreach (var item_ in warehouseId) { urlBuilder_.Append(System.Uri.EscapeDataString("warehouseId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (locationId != null) - { - foreach (var item_ in locationId) { urlBuilder_.Append(System.Uri.EscapeDataString("locationId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (expand != null) - { - foreach (var item_ in expand) { urlBuilder_.Append(System.Uri.EscapeDataString("expand") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (modifiedSince != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("modifiedSince") + "=").Append(System.Uri.EscapeDataString(modifiedSince.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (attributeFilter != null) - { - foreach (var item_ in attributeFilter) { urlBuilder_.Append(System.Uri.EscapeDataString("attributeFilter") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (pageSize != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("pageSize") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (pageIndex != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("pageIndex") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageIndex, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - var client_ = new System.Net.Http.HttpClient(); var disposeClient_ = true; try @@ -400,6 +386,49 @@ public virtual async System.Threading.Tasks.Task h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -518,16 +549,6 @@ public virtual async System.Threading.Tasks.Task> if (orderId == null) throw new System.ArgumentNullException("orderId"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/v3/SalesOrders/{type}/{orderId}?"); - urlBuilder_.Replace("{type}", System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{orderId}", System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); - if (expand != null) - { - foreach (var item_ in expand) { urlBuilder_.Append(System.Uri.EscapeDataString("expand") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - urlBuilder_.Length--; - var client_ = new System.Net.Http.HttpClient(); var disposeClient_ = true; try @@ -537,6 +558,20 @@ public virtual async System.Threading.Tasks.Task> request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + var urlBuilder_ = new System.Text.StringBuilder(); + + // Operation Path: "api/v3/SalesOrders/{type}/{orderId}" + urlBuilder_.Append("api/v3/SalesOrders/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append('/'); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append('?'); + if (expand != null) + { + foreach (var item_ in expand) { urlBuilder_.Append(System.Uri.EscapeDataString("expand")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); } + } + urlBuilder_.Length--; + PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); @@ -548,7 +583,9 @@ public virtual async System.Threading.Tasks.Task> var disposeResponse_ = true; try { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -647,11 +684,6 @@ public virtual async System.Threading.Tasks.Task SalesOrders_Pa if (orderId == null) throw new System.ArgumentNullException("orderId"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/v3/SalesOrders/{type}/{orderId}"); - urlBuilder_.Replace("{type}", System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{orderId}", System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); - var client_ = new System.Net.Http.HttpClient(); var disposeClient_ = true; try @@ -664,6 +696,14 @@ public virtual async System.Threading.Tasks.Task SalesOrders_Pa request_.Content = content_; request_.Method = new System.Net.Http.HttpMethod("PATCH"); + var urlBuilder_ = new System.Text.StringBuilder(); + + // Operation Path: "api/v3/SalesOrders/{type}/{orderId}" + urlBuilder_.Append("api/v3/SalesOrders/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append('/'); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); @@ -675,7 +715,9 @@ public virtual async System.Threading.Tasks.Task SalesOrders_Pa var disposeResponse_ = true; try { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -792,9 +834,9 @@ public virtual async System.Threading.Tasks.Task SalesOrders_Pa /// The order number to delete /// The order was deleted successfully /// A server side error occurred. - public virtual System.Threading.Tasks.Task SalesOrders_Delete_typeorderIdAsync(string type, string orderId, string EtagVersion) + public virtual System.Threading.Tasks.Task SalesOrders_Delete_typeorderIdAsync(string type, string orderId) { - return SalesOrders_Delete_typeorderIdAsync(type, orderId, EtagVersion, System.Threading.CancellationToken.None); + return SalesOrders_Delete_typeorderIdAsync(type, orderId, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. @@ -809,7 +851,7 @@ public virtual System.Threading.Tasks.Task SalesOrders_Delete_t /// The order number to delete /// The order was deleted successfully /// A server side error occurred. - public virtual async System.Threading.Tasks.Task SalesOrders_Delete_typeorderIdAsync(string type, string orderId,string EtagVersion, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task SalesOrders_Delete_typeorderIdAsync(string type, string orderId, System.Threading.CancellationToken cancellationToken) { if (type == null) throw new System.ArgumentNullException("type"); @@ -817,11 +859,6 @@ public virtual async System.Threading.Tasks.Task SalesOrders_De if (orderId == null) throw new System.ArgumentNullException("orderId"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/v3/SalesOrders/{type}/{orderId}"); - urlBuilder_.Replace("{type}", System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{orderId}", System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); - var client_ = new System.Net.Http.HttpClient(); var disposeClient_ = true; try @@ -830,8 +867,15 @@ public virtual async System.Threading.Tasks.Task SalesOrders_De { request_.Method = new System.Net.Http.HttpMethod("DELETE"); + var urlBuilder_ = new System.Text.StringBuilder(); + + // Operation Path: "api/v3/SalesOrders/{type}/{orderId}" + urlBuilder_.Append("api/v3/SalesOrders/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append('/'); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + PrepareRequest(client_, request_, urlBuilder_); - request_.Headers.Add("If-Match", EtagVersion); var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); @@ -842,7 +886,9 @@ public virtual async System.Threading.Tasks.Task SalesOrders_De var disposeResponse_ = true; try { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -975,39 +1021,6 @@ public virtual async System.Threading.Tasks.Task h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -1141,38 +1192,6 @@ public virtual System.Threading.Tasks.TaskA server side error occurred. public virtual async System.Threading.Tasks.Task> SalesOrders_GetList_Async(string customerId, string status, System.DateTimeOffset? modifiedSince, int? pageSize, int? pageIndex, string orderBy, string filter, System.Threading.CancellationToken cancellationToken) { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/v3/SalesOrders?"); - if (customerId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("customerId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(customerId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (status != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("status") + "=").Append(System.Uri.EscapeDataString(ConvertToString(status, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (modifiedSince != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("modifiedSince") + "=").Append(System.Uri.EscapeDataString(modifiedSince.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (pageSize != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("pageSize") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (pageIndex != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("pageIndex") + "=").Append(System.Uri.EscapeDataString(ConvertToString(pageIndex, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (orderBy != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("orderBy") + "=").Append(System.Uri.EscapeDataString(ConvertToString(orderBy, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - var client_ = new System.Net.Http.HttpClient(); var disposeClient_ = true; try @@ -1182,6 +1201,41 @@ public virtual async System.Threading.Tasks.Task h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -1338,9 +1394,6 @@ public virtual System.Threading.Tasks.Task SalesOrders_CreateNe /// A server side error occurred. public virtual async System.Threading.Tasks.Task SalesOrders_CreateNewItem_Async(NewSalesOrderCommand body, System.Threading.CancellationToken cancellationToken) { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/v3/SalesOrders"); - var client_ = new System.Net.Http.HttpClient(); var disposeClient_ = true; try @@ -1353,6 +1406,11 @@ public virtual async System.Threading.Tasks.Task SalesOrders_Cr request_.Content = content_; request_.Method = new System.Net.Http.HttpMethod("POST"); + var urlBuilder_ = new System.Text.StringBuilder(); + + // Operation Path: "api/v3/SalesOrders" + urlBuilder_.Append("api/v3/SalesOrders"); + PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); @@ -1364,7 +1422,9 @@ public virtual async System.Threading.Tasks.Task SalesOrders_Cr var disposeResponse_ = true; try { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -1468,11 +1528,6 @@ public virtual async System.Threading.Tasks.Task h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -1592,11 +1658,6 @@ public virtual async System.Threading.Tasks.Task h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -1720,20 +1792,6 @@ public virtual async System.Threading.Tasks.Task h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -1853,11 +1932,6 @@ public virtual async System.Threading.Tasks.Task SalesOrders_Pa if (orderId == null) throw new System.ArgumentNullException("orderId"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/v3/SalesOrders/{type}/{orderId}/lines"); - urlBuilder_.Replace("{type}", System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{orderId}", System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); - var client_ = new System.Net.Http.HttpClient(); var disposeClient_ = true; try @@ -1870,6 +1944,15 @@ public virtual async System.Threading.Tasks.Task SalesOrders_Pa request_.Content = content_; request_.Method = new System.Net.Http.HttpMethod("PATCH"); + var urlBuilder_ = new System.Text.StringBuilder(); + + // Operation Path: "api/v3/SalesOrders/{type}/{orderId}/lines" + urlBuilder_.Append("api/v3/SalesOrders/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append('/'); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/lines"); + PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); @@ -1881,7 +1964,9 @@ public virtual async System.Threading.Tasks.Task SalesOrders_Pa var disposeResponse_ = true; try { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -2015,16 +2100,6 @@ public virtual async System.Threading.Tasks.Task SalesOrders_De if (orderId == null) throw new System.ArgumentNullException("orderId"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/v3/SalesOrders/{type}/{orderId}/lines?"); - urlBuilder_.Replace("{type}", System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{orderId}", System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); - if (ids != null) - { - foreach (var item_ in ids) { urlBuilder_.Append(System.Uri.EscapeDataString("ids") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - urlBuilder_.Length--; - var client_ = new System.Net.Http.HttpClient(); var disposeClient_ = true; try @@ -2033,6 +2108,21 @@ public virtual async System.Threading.Tasks.Task SalesOrders_De { request_.Method = new System.Net.Http.HttpMethod("DELETE"); + var urlBuilder_ = new System.Text.StringBuilder(); + + // Operation Path: "api/v3/SalesOrders/{type}/{orderId}/lines" + urlBuilder_.Append("api/v3/SalesOrders/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append('/'); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/lines"); + urlBuilder_.Append('?'); + if (ids != null) + { + foreach (var item_ in ids) { urlBuilder_.Append(System.Uri.EscapeDataString("ids")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); } + } + urlBuilder_.Length--; + PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); @@ -2044,7 +2134,9 @@ public virtual async System.Threading.Tasks.Task SalesOrders_De var disposeResponse_ = true; try { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -2154,11 +2246,6 @@ public virtual async System.Threading.Tasks.Task SalesOrders_Ad if (orderId == null) throw new System.ArgumentNullException("orderId"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append("api/v3/SalesOrders/{type}/{orderId}/lines"); - urlBuilder_.Replace("{type}", System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{orderId}", System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); - var client_ = new System.Net.Http.HttpClient(); var disposeClient_ = true; try @@ -2171,6 +2258,15 @@ public virtual async System.Threading.Tasks.Task SalesOrders_Ad request_.Content = content_; request_.Method = new System.Net.Http.HttpMethod("POST"); + var urlBuilder_ = new System.Text.StringBuilder(); + + // Operation Path: "api/v3/SalesOrders/{type}/{orderId}/lines" + urlBuilder_.Append("api/v3/SalesOrders/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append('/'); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/lines"); + PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); @@ -2182,7 +2278,9 @@ public virtual async System.Threading.Tasks.Task SalesOrders_Ad var disposeResponse_ = true; try { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -2301,12 +2399,6 @@ public virtual async System.Threading.Tasks.Task h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -2426,11 +2530,6 @@ public virtual async System.Threading.Tasks.Task h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -2550,11 +2660,6 @@ public virtual async System.Threading.Tasks.Task h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -2674,11 +2790,6 @@ public virtual async System.Threading.Tasks.Task h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) @@ -2852,10 +2974,19 @@ private string ConvertToString(object value, System.Globalization.CultureInfo cu { return System.Convert.ToBase64String((byte[]) value); } + else if (value is string[]) + { + return string.Join(",", (string[])value); + } else if (value.GetType().IsArray) { - var array = System.Linq.Enumerable.OfType((System.Array) value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); + var valueArray = (System.Array)value; + var valueTextArray = new string[valueArray.Length]; + for (var i = 0; i < valueArray.Length; i++) + { + valueTextArray[i] = ConvertToString(valueArray.GetValue(i), cultureInfo); + } + return string.Join(",", valueTextArray); } var result = System.Convert.ToString(value, cultureInfo); @@ -2874,4 +3005,5 @@ private string ConvertToString(object value, System.Globalization.CultureInfo cu #pragma warning restore 8073 #pragma warning restore 3016 #pragma warning restore 8603 -#pragma warning restore 8604 \ No newline at end of file +#pragma warning restore 8604 +#pragma warning restore 8625 \ No newline at end of file diff --git a/Visma.Net.SalesOrderNG/Models/Contracts.cs b/Visma.Net.SalesOrderNG/Models/Contracts.cs index 3b2b870..33635ba 100644 --- a/Visma.Net.SalesOrderNG/Models/Contracts.cs +++ b/Visma.Net.SalesOrderNG/Models/Contracts.cs @@ -1,6 +1,6 @@ //---------------------- // -// Generated using the NSwag toolchain v13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0)) (http://NSwag.org) +// Generated using the NSwag toolchain v14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) // //---------------------- @@ -14,6 +14,7 @@ #pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" #pragma warning disable 8603 // Disable "CS8603 Possible null reference return" #pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" +#pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type" namespace Visma.Net.SalesOrderNG.Models { @@ -21,7 +22,7 @@ namespace Visma.Net.SalesOrderNG.Models - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class AddSalesOrderLinesCommand { [Newtonsoft.Json.JsonProperty("lines", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -29,7 +30,7 @@ public partial class AddSalesOrderLinesCommand } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class AddressDto { /// @@ -82,7 +83,21 @@ public partial class AddressDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class AttachmentDto + { + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Guid Id { get; set; } + + [Newtonsoft.Json.JsonProperty("revision", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Revision { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class CdDescriptionPairDto { /// @@ -99,7 +114,7 @@ public partial class CdDescriptionPairDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class CdNamePairDto { /// @@ -116,7 +131,7 @@ public partial class CdNamePairDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class ContactDto { /// @@ -172,7 +187,7 @@ public partial class ContactDto /// /// The Visma.net.ERP.SalesOrders.Api.Dto.CustomerDto class Defines a customer /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class CustomerDto { /// @@ -244,9 +259,36 @@ public partial class CustomerDto [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } + [Newtonsoft.Json.JsonProperty("exportType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ExportType { get; set; } + + /// + /// The customer's EU sales account + /// + [Newtonsoft.Json.JsonProperty("salesEuAccountId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string SalesEuAccountId { get; set; } + + /// + /// The customer's non taxable sales account + /// + [Newtonsoft.Json.JsonProperty("salesNonTaxableAccountId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string SalesNonTaxableAccountId { get; set; } + + /// + /// The customer's sales account + /// + [Newtonsoft.Json.JsonProperty("salesAccountId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string SalesAccountId { get; set; } + + /// + /// The customer's export sales account + /// + [Newtonsoft.Json.JsonProperty("salesExportAccountId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string SalesExportAccountId { get; set; } + } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class CustomerDtoPagedResult { /// @@ -269,7 +311,7 @@ public partial class CustomerDtoPagedResult } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class CustomerLocationDto { /// @@ -322,7 +364,7 @@ public partial class CustomerLocationDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class CustomerLocationItemDto { /// @@ -409,14 +451,6 @@ public partial class CustomerLocationItemDto [Newtonsoft.Json.JsonProperty("shipViaId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ShipViaId { get; set; } - /// - /// Default ResidentialDelivery.<br /> - ///
This field will be removed with due date 1.12.2023. It is recommended to use <see cref="P:Visma.net.ERP.SalesOrders.Api.Dto.CustomerLocationItemDto.ResidentialDelivery">ResidentialDelivery</see> instead. - ///
- [Newtonsoft.Json.JsonProperty("resedentialDelivery", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.Obsolete] - public bool ResedentialDelivery { get; set; } - /// /// Default ResidentialDelivery /// @@ -467,9 +501,36 @@ public partial class CustomerLocationItemDto [Newtonsoft.Json.JsonProperty("taxZoneId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string TaxZoneId { get; set; } + [Newtonsoft.Json.JsonProperty("exportType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ExportType { get; set; } + + /// + /// Location EU Sales Account + /// + [Newtonsoft.Json.JsonProperty("salesEuAccountId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string SalesEuAccountId { get; set; } + + /// + /// Location non taxable sales account + /// + [Newtonsoft.Json.JsonProperty("salesNonTaxableAccountId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string SalesNonTaxableAccountId { get; set; } + + /// + /// Location sales account + /// + [Newtonsoft.Json.JsonProperty("salesAccountId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string SalesAccountId { get; set; } + + /// + /// Location export sales account + /// + [Newtonsoft.Json.JsonProperty("salesExportAccountId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string SalesExportAccountId { get; set; } + } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class DtoLink { /// @@ -480,7 +541,7 @@ public partial class DtoLink } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class EmployeeDto { /// @@ -497,7 +558,7 @@ public partial class EmployeeDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class IdDescriptionPairDto { /// @@ -517,7 +578,7 @@ public partial class IdDescriptionPairDto /// /// Defines expansion options for the inventory summary endpoint. /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public enum InventoryAvailabilityExpansions { @@ -538,7 +599,7 @@ public enum InventoryAvailabilityExpansions /// /// Inventory summary for a specific inventory item /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class InventoryItemAvailabilityDto { /// @@ -579,7 +640,7 @@ public partial class InventoryItemAvailabilityDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class InventoryItemAvailabilityDtoPagedResult { /// @@ -602,7 +663,7 @@ public partial class InventoryItemAvailabilityDtoPagedResult } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class LocationAvailabilityDto { /// @@ -680,7 +741,7 @@ public partial class LocationAvailabilityDto /// /// Defines a warehouse location /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class LocationDto { /// @@ -702,7 +763,7 @@ public partial class LocationDto ///
When the address information is provided, it is expected to provide all needed fields for the address(line1, line2, countryId etc). ///
No default values from the customer will be set for the non defined address fields. ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class NewSalesOrderAddressDto { /// @@ -756,7 +817,7 @@ public partial class NewSalesOrderAddressDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class NewSalesOrderBillingDto { [Newtonsoft.Json.JsonProperty("contact", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -767,7 +828,7 @@ public partial class NewSalesOrderBillingDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class NewSalesOrderCommand { /// @@ -917,6 +978,15 @@ public partial class NewSalesOrderCommand [System.ComponentModel.DataAnnotations.StringLength(30)] public string ProjectId { get; set; } + /// + /// Sets whether the order is ROT/RUT deductible + /// + [Newtonsoft.Json.JsonProperty("isRotRutDeductible", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? IsRotRutDeductible { get; set; } + + [Newtonsoft.Json.JsonProperty("rotRutDetails", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public NewSalesOrderRotRutDetailsDto RotRutDetails { get; set; } + } /// @@ -924,7 +994,7 @@ public partial class NewSalesOrderCommand ///
When the contact information is provided, it is expected to provide all needed fields for the contact(name, attention etc). ///
No default values from the customer will be set for the non defined contact fields. ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class NewSalesOrderContactDto { /// @@ -957,7 +1027,7 @@ public partial class NewSalesOrderContactDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class NewSalesOrderCustomerDto { /// @@ -1008,7 +1078,7 @@ public partial class NewSalesOrderCustomerDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class NewSalesOrderFinancialInfoDto { /// @@ -1055,7 +1125,7 @@ public partial class NewSalesOrderFinancialInfoDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class NewSalesOrderFreightDto { /// @@ -1080,7 +1150,7 @@ public partial class NewSalesOrderFreightDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class NewSalesOrderLineDto { /// @@ -1325,9 +1395,16 @@ public partial class NewSalesOrderLineDto [System.ComponentModel.DataAnnotations.StringLength(30)] public string ProjectTaskId { get; set; } + /// + /// Indicates if line is RotRut deductible. + ///
If not set, the default value is picked from the inventory item + ///
+ [Newtonsoft.Json.JsonProperty("isRotRutDeductible", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? IsRotRutDeductible { get; set; } + } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class NewSalesOrderPaymentSettings { /// @@ -1352,7 +1429,49 @@ public partial class NewSalesOrderPaymentSettings } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class NewSalesOrderRotRutDetailsDto + { + [Newtonsoft.Json.JsonProperty("distributedAutomatically", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? DistributedAutomatically { get; set; } + + /// + /// Sets the Rot/Rut type of the order, must be "Rut" or "Rut", if not provided a default value will be set + ///
from the default Branch settings. + ///
+ [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + /// + /// Sets the apartment for ROT order, has to be provided together with organisation number. When provided, the estate must be empty + /// + [Newtonsoft.Json.JsonProperty("apartment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(50)] + public string Apartment { get; set; } + + /// + /// Sets the estate for ROT order. When provided, the apartment and organisation number must be empty + /// + [Newtonsoft.Json.JsonProperty("estate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(50)] + public string Estate { get; set; } + + /// + /// Sets the organisation number for ROT order, has to be provided together with apartment. When provided, the estate must be empty + /// + [Newtonsoft.Json.JsonProperty("organisationNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(20)] + public string OrganisationNumber { get; set; } + + /// + /// The person(s) who will receive the tax deduction + /// + [Newtonsoft.Json.JsonProperty("distribution", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Distribution { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class NewSalesOrderShippingDto { /// @@ -1451,7 +1570,7 @@ public partial class NewSalesOrderShippingDto /// Defines an address when updating a sales order. ///
Only the provided fields will be changed in address. ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class PatchSalesOrderAddressDto { /// @@ -1511,7 +1630,7 @@ public partial class PatchSalesOrderAddressDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class PatchSalesOrderBillingDto { [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -1525,7 +1644,7 @@ public partial class PatchSalesOrderBillingDto /// /// The Visma.net.ERP.SalesOrders.Api.Application.Commands.PatchSalesOrder.PatchSalesOrderCommand is a command for updating parts of a sales order /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class PatchSalesOrderCommand { /// @@ -1554,7 +1673,7 @@ public partial class PatchSalesOrderCommand public string Description { get; set; } /// - /// Sets the status code for the order. Must be "Open", "Hold" or "BackOrder". + /// Sets the status for the order. Must be "Open", "Hold", "BackOrder", "Cancelled". When status is set, no other fields may be patched in the same call /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } @@ -1652,13 +1771,22 @@ public partial class PatchSalesOrderCommand [System.ComponentModel.DataAnnotations.StringLength(30)] public string ProjectId { get; set; } + /// + /// Sets whether the order is ROT/RUT deductible + /// + [Newtonsoft.Json.JsonProperty("isRotRutDeductible", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? IsRotRutDeductible { get; set; } + + [Newtonsoft.Json.JsonProperty("rotRutDetails", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public PatchSalesOrderRotRutDetailsDto RotRutDetails { get; set; } + } /// /// Defines an contact when updating a sales order. ///
Only the provided fields will be changed in contact. ///
- [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class PatchSalesOrderContactDto { /// @@ -1697,7 +1825,7 @@ public partial class PatchSalesOrderContactDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class PatchSalesOrderCustomerDto { /// @@ -1742,7 +1870,7 @@ public partial class PatchSalesOrderCustomerDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class PatchSalesOrderFinancialInfoDto { /// @@ -1789,7 +1917,7 @@ public partial class PatchSalesOrderFinancialInfoDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class PatchSalesOrderFreightDto { /// @@ -1817,7 +1945,7 @@ public partial class PatchSalesOrderFreightDto /// /// The sales order line which is set to patch /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class PatchSalesOrderLineDto { /// @@ -2059,12 +2187,25 @@ public partial class PatchSalesOrderLineDto [Newtonsoft.Json.JsonProperty("supplierPrice", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? SupplierPrice { get; set; } + /// + /// Indicates if the line is completed or not. + ///
If provided, this is the only operation that can be performed on the line. + ///
+ [Newtonsoft.Json.JsonProperty("completed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? Completed { get; set; } + + /// + /// Indicates if line is RotRut deductible. + /// + [Newtonsoft.Json.JsonProperty("isRotRutDeductible", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? IsRotRutDeductible { get; set; } + } /// /// The Visma.net.ERP.SalesOrders.Api.Application.Commands.PatchSalesOrderLines.PatchSalesOrderLinesCommand is a command for updating the lines of a sales order /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class PatchSalesOrderLinesCommand { /// @@ -2075,7 +2216,7 @@ public partial class PatchSalesOrderLinesCommand } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class PatchSalesOrderPaymentSettingsDto { /// @@ -2100,7 +2241,50 @@ public partial class PatchSalesOrderPaymentSettingsDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class PatchSalesOrderRotRutDetailsDto + { + [Newtonsoft.Json.JsonProperty("distributedAutomatically", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? DistributedAutomatically { get; set; } + + /// + /// Sets the apartment for ROT order, has to be provided together with organisation number. When provided, the estate must be empty + /// + [Newtonsoft.Json.JsonProperty("apartment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(50)] + public string Apartment { get; set; } + + /// + /// Sets the estate for ROT order. When provided, the apartment and organisation number must be empty + /// + [Newtonsoft.Json.JsonProperty("estate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(50)] + public string Estate { get; set; } + + /// + /// Sets the organisation number for ROT order, has to be provided together with apartment. When provided, the estate must be empty + /// + [Newtonsoft.Json.JsonProperty("organisationNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(20)] + public string OrganisationNumber { get; set; } + + /// + /// Sets the Rot/Rut type of the order, must be "Rut" or "Rut", if null will be provided a default value will be set + ///
from the default Branch settings. + ///
+ [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + /// + /// The person(s) who will receive the tax deduction. + ///
When provided, it will replace the existing distribution. + ///
+ [Newtonsoft.Json.JsonProperty("distribution", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Distribution { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class PatchSalesOrderShippingDto { /// @@ -2196,7 +2380,7 @@ public partial class PatchSalesOrderShippingDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class ProblemDetails { [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -2228,7 +2412,7 @@ public System.Collections.Generic.IDictionary AdditionalProperti /// /// The Visma.net.ERP.SalesOrders.Api.Dto.ProjectDto class defines a project reference for a sales order /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class ProjectDto { /// @@ -2251,7 +2435,31 @@ public partial class ProjectDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class RotRutDistributionDto + { + /// + /// The personal ID of the person receiving the tax deduction + /// + [Newtonsoft.Json.JsonProperty("personalId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(20)] + public string PersonalId { get; set; } + + /// + /// Selection to indicate that this is an extra amount + /// + [Newtonsoft.Json.JsonProperty("extra", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? Extra { get; set; } + + /// + /// The total amount that is tax deductible + /// + [Newtonsoft.Json.JsonProperty("amount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Amount { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderBillingDto { [Newtonsoft.Json.JsonProperty("contact", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -2262,7 +2470,7 @@ public partial class SalesOrderBillingDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderCommissionDto { /// @@ -2291,7 +2499,7 @@ public partial class SalesOrderCommissionDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderCustomerDto { /// @@ -2338,7 +2546,7 @@ public partial class SalesOrderCustomerDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderDiscountDto { /// @@ -2412,7 +2620,7 @@ public partial class SalesOrderDiscountDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderDto { /// @@ -2466,10 +2674,18 @@ public partial class SalesOrderDto /// /// Whether the order is ROT/RUT deductible + ///
<remarks>This will be removed in the future ! Use IsRotRutDeductible instead.</remarks> ///
[Newtonsoft.Json.JsonProperty("isRotRutDeductable", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.Obsolete] public bool IsRotRutDeductable { get; set; } + /// + /// Whether the order is ROT/RUT deductible + /// + [Newtonsoft.Json.JsonProperty("isRotRutDeductible", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsRotRutDeductible { get; set; } + /// /// The total quantity of inventory items in the order /// @@ -2558,12 +2774,24 @@ public partial class SalesOrderDto [Newtonsoft.Json.JsonProperty("version", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public byte[] Version { get; set; } + /// + /// The attachments of the order + /// + [Newtonsoft.Json.JsonProperty("attachments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Attachments { get; set; } + + /// + /// Indicates if the document was emailed + /// + [Newtonsoft.Json.JsonProperty("emailed", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Emailed { get; set; } + } /// /// The Visma.net.ERP.SalesOrders.Api.Dto.SalesOrderExpansions enumeration defines individual parts of the Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDto that can be filled /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public enum SalesOrderExpansions { @@ -2597,12 +2825,15 @@ public enum SalesOrderExpansions [System.Runtime.Serialization.EnumMember(Value = @"Freight")] Freight = 9, + [System.Runtime.Serialization.EnumMember(Value = @"Attachments")] + Attachments = 10, + [System.Runtime.Serialization.EnumMember(Value = @"All")] - All = 10, + All = 11, } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderFinancialInfoDto { /// @@ -2649,7 +2880,7 @@ public partial class SalesOrderFinancialInfoDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderFreightDto { [Newtonsoft.Json.JsonProperty("volume", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -2704,7 +2935,7 @@ public partial class SalesOrderFreightDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderLineDto { /// @@ -2908,6 +3139,12 @@ public partial class SalesOrderLineDto [Newtonsoft.Json.JsonProperty("discountCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string DiscountCode { get; set; } + /// + /// Id of discount sequence applied to this line + /// + [Newtonsoft.Json.JsonProperty("discountSequenceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string DiscountSequenceId { get; set; } + /// /// Discount is applied manually /// @@ -2973,9 +3210,33 @@ public partial class SalesOrderLineDto [Newtonsoft.Json.JsonProperty("projectTaskId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ProjectTaskId { get; set; } + /// + /// The attachments associated with this sales order line + /// + [Newtonsoft.Json.JsonProperty("attachments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Attachments { get; set; } + + /// + /// The purchase order numbers that are linked to the sales order line + /// + [Newtonsoft.Json.JsonProperty("purchaseOrderNumbers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection PurchaseOrderNumbers { get; set; } + + [Newtonsoft.Json.JsonProperty("isRotRutDeductible", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? IsRotRutDeductible { get; set; } + + [Newtonsoft.Json.JsonProperty("rotRutWorkType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string RotRutWorkType { get; set; } + + [Newtonsoft.Json.JsonProperty("rotRutDeductibleAmount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double RotRutDeductibleAmount { get; set; } + + [Newtonsoft.Json.JsonProperty("rotRutItemType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CdDescriptionPairDto RotRutItemType { get; set; } + } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderLineDtoPagedResult { /// @@ -2998,7 +3259,7 @@ public partial class SalesOrderLineDtoPagedResult } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderLineInventoryDto { /// @@ -3018,7 +3279,7 @@ public partial class SalesOrderLineInventoryDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderListDto { /// @@ -3083,6 +3344,12 @@ public partial class SalesOrderListDto [Newtonsoft.Json.JsonProperty("orderTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double OrderTotal { get; set; } + /// + /// The tax total + /// + [Newtonsoft.Json.JsonProperty("taxTotal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double TaxTotal { get; set; } + /// /// The currency id for the order /// @@ -3128,7 +3395,7 @@ public partial class SalesOrderListDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderListDtoPagedResult { /// @@ -3151,7 +3418,7 @@ public partial class SalesOrderListDtoPagedResult } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderOriginDto { /// @@ -3174,7 +3441,7 @@ public partial class SalesOrderOriginDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderPaymentDto { [Newtonsoft.Json.JsonProperty("paymentMethod", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -3194,7 +3461,7 @@ public partial class SalesOrderPaymentDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderPrintDto { /// @@ -3217,7 +3484,7 @@ public partial class SalesOrderPrintDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderRotRutDistributionDto { /// @@ -3246,7 +3513,7 @@ public partial class SalesOrderRotRutDistributionDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderRotRutDto { /// @@ -3262,11 +3529,19 @@ public partial class SalesOrderRotRutDto public string Type { get; set; } /// - /// The appartment reference + /// The apartment reference + ///
<remarks>This will be removed in the future ! Use Apartment instead.</remarks> ///
[Newtonsoft.Json.JsonProperty("appartment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.Obsolete] public string Appartment { get; set; } + /// + /// The apartment reference + /// + [Newtonsoft.Json.JsonProperty("apartment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Apartment { get; set; } + /// /// The estate reference /// @@ -3279,6 +3554,36 @@ public partial class SalesOrderRotRutDto [Newtonsoft.Json.JsonProperty("organizationNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string OrganizationNumber { get; set; } + /// + /// The total amount that is tax deductable + /// + [Newtonsoft.Json.JsonProperty("totalDeductableAmount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? TotalDeductableAmount { get; set; } + + /// + /// Cost amount for lines with inventory ROT/RUT item type OtherCost + /// + [Newtonsoft.Json.JsonProperty("otherCostAmount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? OtherCostAmount { get; set; } + + /// + /// Cost amount for lines with inventory ROT/RUT item type Material + /// + [Newtonsoft.Json.JsonProperty("materialCostAmount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? MaterialCostAmount { get; set; } + + /// + /// Price amount for lines with inventory ROT/RUT item type Service + /// + [Newtonsoft.Json.JsonProperty("workPriceAmount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? WorkPriceAmount { get; set; } + + /// + /// The total amount distributed among the specified personal IDs + /// + [Newtonsoft.Json.JsonProperty("distributedAmount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? DistributedAmount { get; set; } + /// /// The distrinbution entries /// @@ -3290,7 +3595,7 @@ public partial class SalesOrderRotRutDto /// /// The Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderShipmentDto specifies a shipment line detail for a sales order /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderShipmentDto { /// @@ -3355,7 +3660,7 @@ public partial class SalesOrderShipmentDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderShippingDto { [Newtonsoft.Json.JsonProperty("contact", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -3427,7 +3732,7 @@ public partial class SalesOrderShippingDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderStatusDto { /// @@ -3453,7 +3758,7 @@ public partial class SalesOrderStatusDto /// /// The Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderTaxDto specifies a tax line detail for a sales order /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderTaxDto { /// @@ -3518,7 +3823,7 @@ public partial class SalesOrderTaxDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderTotalsDto { /// @@ -3648,7 +3953,7 @@ public partial class SalesOrderTotalsDto /// /// Defines an error response for validation problems /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesOrderValidationProblemDetails { [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -3686,7 +3991,7 @@ public System.Collections.Generic.IDictionary AdditionalProperti } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SalesPersonDto { /// @@ -3703,7 +4008,7 @@ public partial class SalesPersonDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SupplierDto { [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -3717,7 +4022,7 @@ public partial class SupplierDto /// /// Defines details related to validation problems /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class ValidationErrorCodeDetails { /// @@ -3744,7 +4049,7 @@ public partial class ValidationErrorCodeDetails /// /// Warehouse information for a specific inventory item /// - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class WarehouseAvailabilityDto { /// @@ -3836,7 +4141,7 @@ public partial class WarehouseAvailabilityDto } - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SwaggerResponse { public int StatusCode { get; private set; } @@ -3850,7 +4155,7 @@ public SwaggerResponse(int statusCode, System.Collections.Generic.IReadOnlyDicti } } - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SwaggerResponse : SwaggerResponse { public TResult Result { get; private set; } @@ -3863,7 +4168,7 @@ public SwaggerResponse(int statusCode, System.Collections.Generic.IReadOnlyDicti } - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class ApiException : System.Exception { public int StatusCode { get; private set; } @@ -3886,7 +4191,7 @@ public override string ToString() } } - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class ApiException : ApiException { public TResult Result { get; private set; } @@ -3909,4 +4214,5 @@ public ApiException(string message, int statusCode, string response, System.Coll #pragma warning restore 8073 #pragma warning restore 3016 #pragma warning restore 8603 -#pragma warning restore 8604 \ No newline at end of file +#pragma warning restore 8604 +#pragma warning restore 8625 \ No newline at end of file diff --git a/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs b/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs index c6b0f46..bcdcea0 100644 --- a/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs +++ b/Visma.net/Models/CustomDto/CustomerGLAccountDto.cs @@ -61,7 +61,7 @@ [JsonProperty] public GLAccountDetailsDto supplierAccount { [JsonProperty] public IdDescription supplierSubaccount { - get => Get(); + get => Get(defaultValue: new IdDescription()); private set => Set(value); } diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index e339b96..dedad68 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -4,7 +4,7 @@ Visma.net Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 - 4.2.1.18 + 4.2.1.19 netstandard2.0;net462;net6 Visma.net Copyright © ON IT AS 2014 - 2022 @@ -25,8 +25,8 @@ LICENSE.md on_it_logo.png README.md - 4.2.1.18 - 4.2.1.18 + 4.2.1.19 + 4.2.1.19 $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage From f2fc4efe661a95b7c17214370350255b4650ab61 Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Mon, 20 May 2024 15:52:12 +0200 Subject: [PATCH 33/37] Version bump --- Visma.net/Visma.net.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index dedad68..90274d5 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -4,7 +4,7 @@ Visma.net Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 - 4.2.1.19 + 4.2.1.20 netstandard2.0;net462;net6 Visma.net Copyright © ON IT AS 2014 - 2022 @@ -25,8 +25,8 @@ LICENSE.md on_it_logo.png README.md - 4.2.1.19 - 4.2.1.19 + 4.2.1.20 + 4.2.1.20 $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage From 0d8607c70da542657f42cc4c6f42c70a11b4228a Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Thu, 23 May 2024 15:06:49 +0200 Subject: [PATCH 34/37] Fixes to inventory --- .../Visma.Net.SalesOrderNG.csproj | 2 +- Visma.net/Models/CustomDto/Intrastat.cs | 25 +++++++++++--- Visma.net/Models/CustomDto/Packaging.cs | 33 +++++++++++++++---- Visma.net/Models/Inventory.cs | 5 ++- Visma.net/Visma.net.csproj | 8 ++--- 5 files changed, 54 insertions(+), 19 deletions(-) diff --git a/Visma.Net.SalesOrderNG/Visma.Net.SalesOrderNG.csproj b/Visma.Net.SalesOrderNG/Visma.Net.SalesOrderNG.csproj index b98e5cd..31cdda9 100644 --- a/Visma.Net.SalesOrderNG/Visma.Net.SalesOrderNG.csproj +++ b/Visma.Net.SalesOrderNG/Visma.Net.SalesOrderNG.csproj @@ -9,7 +9,7 @@ - + diff --git a/Visma.net/Models/CustomDto/Intrastat.cs b/Visma.net/Models/CustomDto/Intrastat.cs index a82b458..c4ce50f 100644 --- a/Visma.net/Models/CustomDto/Intrastat.cs +++ b/Visma.net/Models/CustomDto/Intrastat.cs @@ -2,12 +2,27 @@ namespace ONIT.VismaNetApi.Models.CustomDto { - public class Intrastat : DtoProviderBase + public class Intrastat : DtoProviderBase, IProvideCustomDto { - public string cN8 { get; set; } - public string countryOfOrigin { get; set; } - public string supplementaryMeasureUnit { get; set; } - + public string cN8 + { + get => Get(); + set => Set(value?.Trim()); + } + public string countryOfOrigin + { + get => Get(); + set => Set(value?.Trim()); + } + public string supplementaryMeasureUnit + { + get => Get(); + set => Set(value?.Trim()); + } + public object ToDto() + { + return base.ToDto(); + } } } \ No newline at end of file diff --git a/Visma.net/Models/CustomDto/Packaging.cs b/Visma.net/Models/CustomDto/Packaging.cs index cbb633a..1a7882c 100644 --- a/Visma.net/Models/CustomDto/Packaging.cs +++ b/Visma.net/Models/CustomDto/Packaging.cs @@ -1,13 +1,34 @@ -using ONIT.VismaNetApi.Lib; +using ONIT.VismaNetApi.Interfaces; +using ONIT.VismaNetApi.Lib; namespace ONIT.VismaNetApi.Models.CustomDto { - public class Packaging : DtoProviderBase + public class Packaging : DtoProviderBase, IProvideCustomDto { - public decimal baseItemWeight { get; set; } - public string weightUOM { get; set; } - public decimal baseItemVolume { get; set; } - public string volumeUOM { get; set; } + public decimal baseItemWeight + { + get => Get("baseItemWeight"); + set => Set(value); + } + public string weightUOM + { + get => Get(); + set => Set(value?.Trim()); + } + public decimal baseItemVolume + { + get => Get(); + set => Set(value); + } + public string volumeUOM + { + get => Get(); + set => Set(value?.Trim()); + } + public object ToDto() + { + return base.ToDto(); + } } } \ No newline at end of file diff --git a/Visma.net/Models/Inventory.cs b/Visma.net/Models/Inventory.cs index f7ca782..0e5870f 100644 --- a/Visma.net/Models/Inventory.cs +++ b/Visma.net/Models/Inventory.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Text.Json.Serialization; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using ONIT.VismaNetApi.Lib; @@ -193,9 +194,7 @@ public List inventoryUnits get => _inventoryUnits ?? (_inventoryUnits = new List()); private set => _inventoryUnits = value; } - - public Packaging packaging - { + public Packaging packaging { get => Get(); set => Set(value); } diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index 90274d5..04dc2d5 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -4,7 +4,7 @@ Visma.net Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 - 4.2.1.20 + 4.2.1.22 netstandard2.0;net462;net6 Visma.net Copyright © ON IT AS 2014 - 2022 @@ -25,8 +25,8 @@ LICENSE.md on_it_logo.png README.md - 4.2.1.20 - 4.2.1.20 + 4.2.1.22 + 4.2.1.22 $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage @@ -37,7 +37,7 @@ - + From a96a85da7468f30bd9eac7dbcce3923319da0214 Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Wed, 5 Feb 2025 09:16:10 +0100 Subject: [PATCH 35/37] Updated SalesOrderNG --- Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs | 154 ++++- Visma.Net.SalesOrderNG/Models/Contracts.cs | 615 ++++++++++++++++++- 2 files changed, 726 insertions(+), 43 deletions(-) diff --git a/Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs b/Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs index 0d0c248..a394793 100644 --- a/Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs +++ b/Visma.Net.SalesOrderNG/ClientSalesOrderV3.cs @@ -321,15 +321,17 @@ public virtual async System.Threading.Tasks.Task ///
If modifiedSinceCondition is not specified, it defaults to >=. ///
If modifiedSince is not specified, it defaults to 1900-01-01. + ///
+ ///
If expand with lotSerial, only the lotSerial numbers that has quantity will be included in the response. ///
- ///
GET /inventory?inventoryId=Item1&InventoryId=Item2&expand=location,attribute + ///
GET /inventory?inventoryId=Item1&InventoryId=Item2&expand=location,attribute,lotSerial ///
///
GET /inventory?expand=location&attributeFilter=WEBSHOP:1 /// /// A list of zero or more inventory items to get a summary for. If no inventoryId is passed, all inventory items will be included in the response. /// A list of zero or more warehouses to get a summary for. If no warehouse is supplied, all warehouses will be included in the response. /// A list of zero or more locations to get a summary for. If no location is supplied, all locations will be included in the response. - /// An additional option to include location detail information with the warehouse summary, or attribute details for the inventory item. If this is not supplied, location information or attributes will not be included in the response. + /// An additional option to include location detail information with the warehouse summary, attribute details for the inventory item or lot/serial details. If this is not supplied, location information or attributes will not be included in the response. /// Condition used in filtering when an inventory item's warehouse or location availability last changed /// A date/time value for filtering when an inventory item's warehouse or location availability last changed ///
Unless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone. @@ -357,15 +359,17 @@ public virtual System.Threading.Tasks.Task ///
If modifiedSinceCondition is not specified, it defaults to >=. ///
If modifiedSince is not specified, it defaults to 1900-01-01. + ///
+ ///
If expand with lotSerial, only the lotSerial numbers that has quantity will be included in the response. ///
- ///
GET /inventory?inventoryId=Item1&InventoryId=Item2&expand=location,attribute + ///
GET /inventory?inventoryId=Item1&InventoryId=Item2&expand=location,attribute,lotSerial ///
///
GET /inventory?expand=location&attributeFilter=WEBSHOP:1 /// /// A list of zero or more inventory items to get a summary for. If no inventoryId is passed, all inventory items will be included in the response. /// A list of zero or more warehouses to get a summary for. If no warehouse is supplied, all warehouses will be included in the response. /// A list of zero or more locations to get a summary for. If no location is supplied, all locations will be included in the response. - /// An additional option to include location detail information with the warehouse summary, or attribute details for the inventory item. If this is not supplied, location information or attributes will not be included in the response. + /// An additional option to include location detail information with the warehouse summary, attribute details for the inventory item or lot/serial details. If this is not supplied, location information or attributes will not be included in the response. /// Condition used in filtering when an inventory item's warehouse or location availability last changed /// A date/time value for filtering when an inventory item's warehouse or location availability last changed ///
Unless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone. @@ -984,7 +988,7 @@ public virtual async System.Threading.Tasks.Task SalesOrders_De /// The number of customers retrieved per page /// The zero based page index to retrieve /// The field to order the list by. Can be one of `created`, `lastModified`, or `orderId` followed by an optional sort direction (`asc` or `desc`), default direction is `asc` (ascending) if not present. - /// A filter for the list, applied to the orderId + /// A filter for the list, applied to the OrderId, CustomerOrderNumber and CustomerName /// Returns a list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderListDto found. /// A server side error occurred. public virtual System.Threading.Tasks.Task> SalesOrders_GetList_typeAsync(string type, string customerId, string status, System.DateTimeOffset? modifiedSince, int? pageSize, int? pageIndex, string orderBy, string filter) @@ -1013,7 +1017,7 @@ public virtual System.Threading.Tasks.TaskThe number of customers retrieved per page /// The zero based page index to retrieve /// The field to order the list by. Can be one of `created`, `lastModified`, or `orderId` followed by an optional sort direction (`asc` or `desc`), default direction is `asc` (ascending) if not present. - /// A filter for the list, applied to the orderId + /// A filter for the list, applied to the OrderId, CustomerOrderNumber and CustomerName /// Returns a list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderListDto found. /// A server side error occurred. public virtual async System.Threading.Tasks.Task> SalesOrders_GetList_typeAsync(string type, string customerId, string status, System.DateTimeOffset? modifiedSince, int? pageSize, int? pageIndex, string orderBy, string filter, System.Threading.CancellationToken cancellationToken) @@ -1141,7 +1145,7 @@ public virtual async System.Threading.Tasks.Task - /// Gets a paged list with sales orders of any type + /// Gets a paged list with sales orders of any type. ///
/// /// Sample requests: @@ -1159,7 +1163,7 @@ public virtual async System.Threading.Tasks.TaskThe number of customers retrieved per page /// The zero based page index to retrieve /// The field to order the list by. Can be one of `created`, `lastModified`, or `orderId` followed by an optional sort direction (`asc` or `desc`), default direction is `asc` (ascending) if not present. - /// A filter for the list, applied to the orderId + /// A filter for the list, applied to the OrderId, CustomerOrderNumber and CustomerName /// Returns a list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderListDto found. /// A server side error occurred. public virtual System.Threading.Tasks.Task> SalesOrders_GetList_Async(string customerId, string status, System.DateTimeOffset? modifiedSince, int? pageSize, int? pageIndex, string orderBy, string filter) @@ -1169,7 +1173,7 @@ public virtual System.Threading.Tasks.TaskA cancellation token that can be used by other objects or threads to receive notice of cancellation. /// - /// Gets a paged list with sales orders of any type + /// Gets a paged list with sales orders of any type. /// /// /// Sample requests: @@ -1187,7 +1191,7 @@ public virtual System.Threading.Tasks.TaskThe number of customers retrieved per page /// The zero based page index to retrieve /// The field to order the list by. Can be one of `created`, `lastModified`, or `orderId` followed by an optional sort direction (`asc` or `desc`), default direction is `asc` (ascending) if not present. - /// A filter for the list, applied to the orderId + /// A filter for the list, applied to the OrderId, CustomerOrderNumber and CustomerName /// Returns a list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderListDto found. /// A server side error occurred. public virtual async System.Threading.Tasks.Task> SalesOrders_GetList_Async(string customerId, string status, System.DateTimeOffset? modifiedSince, int? pageSize, int? pageIndex, string orderBy, string filter, System.Threading.CancellationToken cancellationToken) @@ -2882,6 +2886,136 @@ public virtual async System.Threading.Tasks.Task + /// Gets payments detail information for a single sales order + ///
+ /// + /// Sample request: + ///
+ ///
`GET /salesorders/SO/000101/payments` + ///
+ /// The type of sales order to get + /// The id of the sales order to get + /// A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderPaymentDto if found and accessible + /// A server side error occurred. + public virtual System.Threading.Tasks.Task>> SalesOrders_GetItemPayments_typeorderIdpaymentsAsync(string type, string orderId) + { + return SalesOrders_GetItemPayments_typeorderIdpaymentsAsync(type, orderId, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Gets payments detail information for a single sales order + /// + /// + /// Sample request: + ///
+ ///
`GET /salesorders/SO/000101/payments` + ///
+ /// The type of sales order to get + /// The id of the sales order to get + /// A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderPaymentDto if found and accessible + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task>> SalesOrders_GetItemPayments_typeorderIdpaymentsAsync(string type, string orderId, System.Threading.CancellationToken cancellationToken) + { + if (type == null) + throw new System.ArgumentNullException("type"); + + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + var client_ = new System.Net.Http.HttpClient(); + var disposeClient_ = true; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + + // Operation Path: "api/v3/SalesOrders/{type}/{orderId}/payments" + urlBuilder_.Append("api/v3/SalesOrders/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append('/'); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/payments"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return new SwaggerResponse>(status_, headers_, objectResponse_.Object); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("If an order with type type and orderId is not found, or is not accessible.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Unauthorized", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("Forbidden", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + protected struct ObjectResponseResult { public ObjectResponseResult(T responseObject, string responseText) diff --git a/Visma.Net.SalesOrderNG/Models/Contracts.cs b/Visma.Net.SalesOrderNG/Models/Contracts.cs index 33635ba..4160787 100644 --- a/Visma.Net.SalesOrderNG/Models/Contracts.cs +++ b/Visma.Net.SalesOrderNG/Models/Contracts.cs @@ -83,6 +83,51 @@ public partial class AddressDto } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class AllocationDto + { + [Newtonsoft.Json.JsonProperty("inventoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string InventoryId { get; set; } + + [Newtonsoft.Json.JsonProperty("lotSerialNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(100)] + public string LotSerialNumber { get; set; } + + [Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("expirationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ExpirationDate { get; set; } + + [Newtonsoft.Json.JsonProperty("allocated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Allocated { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class AllocationDtoRead + { + [Newtonsoft.Json.JsonProperty("inventoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string InventoryId { get; set; } + + [Newtonsoft.Json.JsonProperty("lotSerialNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(100)] + public string LotSerialNumber { get; set; } + + [Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("expirationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ExpirationDate { get; set; } + + [Newtonsoft.Json.JsonProperty("allocated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Allocated { get; set; } + + [Newtonsoft.Json.JsonProperty("unitOfMeasure", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UnitOfMeasure { get; set; } + + } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class AttachmentDto { @@ -184,6 +229,71 @@ public partial class ContactDto } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class CustomFieldsDto + { + /// + /// A free custom colum of type string with max length 100. + /// + [Newtonsoft.Json.JsonProperty("customStr1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CustomStr1 { get; set; } + + /// + /// A free custom colum of type string with max length 100. + /// + [Newtonsoft.Json.JsonProperty("customStr2", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CustomStr2 { get; set; } + + /// + /// A free custom colum of type string with max length 100. + /// + [Newtonsoft.Json.JsonProperty("customStr3", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CustomStr3 { get; set; } + + /// + /// A free custom colum of type string with max length 100. + /// + [Newtonsoft.Json.JsonProperty("customStr4", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CustomStr4 { get; set; } + + /// + /// A free custom colum of type string with max length 100. + /// + [Newtonsoft.Json.JsonProperty("customStr5", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CustomStr5 { get; set; } + + /// + /// A free custom colum of type decimal with max 4 decimals. + /// + [Newtonsoft.Json.JsonProperty("customDec1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? CustomDec1 { get; set; } + + /// + /// A free custom colum of type decimal with max 4 decimals. + /// + [Newtonsoft.Json.JsonProperty("customDec2", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? CustomDec2 { get; set; } + + /// + /// A free custom colum of type int + /// + [Newtonsoft.Json.JsonProperty("customInt1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? CustomInt1 { get; set; } + + /// + /// A free custom colum of type int + /// + [Newtonsoft.Json.JsonProperty("customInt2", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? CustomInt2 { get; set; } + + /// + /// A free custom colum of type DateTime - in UTC timezone + /// + [Newtonsoft.Json.JsonProperty("customDateTimeUtc1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? CustomDateTimeUtc1 { get; set; } + + } + /// /// The Visma.net.ERP.SalesOrders.Api.Dto.CustomerDto class Defines a customer /// @@ -477,7 +587,9 @@ public partial class CustomerLocationItemDto /// /// Shipping rule of the customer set default for the order - ///
<br>Is one of the following options:<br><list type="bullet"><item><term>CancelRemainder: </term><description>The ordered quantity should be delivered in one shipment</description></item><item><term>BackOrderAllowed: </term><description>The ordered quantity can be delivered in multiple shipments.</description></item><item><term>ShipComplete: </term><description>The ordered quantity should be delivered in one shipment.</description></item></list> + ///
+ ///
Is one of the following options: + ///
<list type="bullet"><item><term>CancelRemainder: </term><description>The ordered quantity should be delivered in one shipment</description></item><item><term>BackOrderAllowed: </term><description>The ordered quantity can be delivered in multiple shipments.</description></item><item><term>ShipComplete: </term><description>The ordered quantity should be delivered in one shipment.</description></item></list> ///
[Newtonsoft.Json.JsonProperty("shippingRule", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ShippingRule { get; set; } @@ -591,8 +703,11 @@ public enum InventoryAvailabilityExpansions [System.Runtime.Serialization.EnumMember(Value = @"Attribute")] Attribute = 2, + [System.Runtime.Serialization.EnumMember(Value = @"LotSerial")] + LotSerial = 3, + [System.Runtime.Serialization.EnumMember(Value = @"All")] - All = 3, + All = 4, } @@ -663,6 +778,14 @@ public partial class InventoryItemAvailabilityDtoPagedResult } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class KitAssemblyDto + { + [Newtonsoft.Json.JsonProperty("referenceNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ReferenceNumber { get; set; } + + } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class LocationAvailabilityDto { @@ -736,6 +859,12 @@ public partial class LocationAvailabilityDto [Newtonsoft.Json.JsonProperty("lastModified", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset LastModified { get; set; } + /// + /// LOT/Serial information + /// + [Newtonsoft.Json.JsonProperty("lotSerials", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection LotSerials { get; set; } + } /// @@ -758,6 +887,50 @@ public partial class LocationDto } + /// + /// Inventory summary for a specific lot/serial number + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class LotSerialAvailabilityDto + { + /// + /// Id/number of the LOT/Serial + /// + [Newtonsoft.Json.JsonProperty("lotSerialNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string LotSerialNumber { get; set; } + + /// + /// Expiration date of the LOT/Serial + /// + [Newtonsoft.Json.JsonProperty("expirationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ExpirationDate { get; set; } + + /// + /// Physical quantity on-hand of item LOT/Serial id + /// + [Newtonsoft.Json.JsonProperty("quantityOnHand", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double QuantityOnHand { get; set; } + + /// + /// Quantity available of item LOT/Serial id according to set availability calculation rules + /// + [Newtonsoft.Json.JsonProperty("quantityAvailable", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double QuantityAvailable { get; set; } + + /// + /// Quantity of item LOT/Serial id available for shipping + /// + [Newtonsoft.Json.JsonProperty("quantityAvailableForShipment", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double QuantityAvailableForShipment { get; set; } + + /// + /// Quantity of item LOT/Serial id not included in the availability calculation + /// + [Newtonsoft.Json.JsonProperty("quantityNotAvailable", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double QuantityNotAvailable { get; set; } + + } + /// /// Defines a new address when creating a sales order. ///
When the address information is provided, it is expected to provide all needed fields for the address(line1, line2, countryId etc). @@ -840,7 +1013,8 @@ public partial class NewSalesOrderCommand /// /// Sets the new id that should be assigned to the new sales order. - ///
This is required if the specified Visma.net.ERP.SalesOrders.Api.Application.Commands.NewSalesOrder.NewSalesOrderCommand.Type has manual numbering set up. If not it should be null or empty. + ///
This is required if the specified Visma.net.ERP.SalesOrders.Api.Application.Commands.NewSalesOrder.NewSalesOrderCommand.Type has manual numbering set up or Visma.net.ERP.SalesOrders.Api.Application.Commands.NewSalesOrder.NewSalesOrderCommand.OverrideNumberSeries from the request is true. + ///
If not, it should be null or empty. ///
[Newtonsoft.Json.JsonProperty("orderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(15)] @@ -876,7 +1050,8 @@ public partial class NewSalesOrderCommand /// /// Sets the description for the order to create - ///
<br>Note that text fields should not contain any personally identifiable or otherwise sensitive data + ///
+ ///
Note that text fields should not contain any personally identifiable or otherwise sensitive data ///
[Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(255)] @@ -951,7 +1126,8 @@ public partial class NewSalesOrderCommand public string BranchId { get; set; } /// - /// Sets the type code for the original sales order + /// Sets the type code for the original sales order. + ///
If order is deleted and the field contains a order type/order number used as quote and is in status Complete, the original quote order will be reset to Open status ///
[Newtonsoft.Json.JsonProperty("originalOrderType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2)] @@ -959,6 +1135,7 @@ public partial class NewSalesOrderCommand /// /// Sets the unique identifier of the original order + ///
If order is deleted and the field contains a order type/order number used as quote and is in status Complete, the original quote order will be reset to Open status ///
[Newtonsoft.Json.JsonProperty("originalOrderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(15)] @@ -987,6 +1164,15 @@ public partial class NewSalesOrderCommand [Newtonsoft.Json.JsonProperty("rotRutDetails", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public NewSalesOrderRotRutDetailsDto RotRutDetails { get; set; } + /// + /// Used to override the orderId that would else be set automatically by the system. When set true, also orderId should be provided + /// + [Newtonsoft.Json.JsonProperty("overrideNumberSeries", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool OverrideNumberSeries { get; set; } + + [Newtonsoft.Json.JsonProperty("customFields", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public NewSalesOrderCustomFieldsDto CustomFields { get; set; } + } /// @@ -1019,12 +1205,80 @@ public partial class NewSalesOrderContactDto public string Phone1 { get; set; } /// - /// Sets the e-mail address of the contact + /// Sets the e-mail address of the contact, multiple e-mails can be separated by semicolon /// [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(255)] public string Email { get; set; } + [Newtonsoft.Json.JsonProperty("emails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Emails { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class NewSalesOrderCustomFieldsDto + { + /// + /// A free custom colum of type string with max length 100. + /// + [Newtonsoft.Json.JsonProperty("customStr1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CustomStr1 { get; set; } + + /// + /// A free custom colum of type string with max length 100. + /// + [Newtonsoft.Json.JsonProperty("customStr2", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CustomStr2 { get; set; } + + /// + /// A free custom colum of type string with max length 100. + /// + [Newtonsoft.Json.JsonProperty("customStr3", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CustomStr3 { get; set; } + + /// + /// A free custom colum of type string with max length 100. + /// + [Newtonsoft.Json.JsonProperty("customStr4", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CustomStr4 { get; set; } + + /// + /// A free custom colum of type string with max length 100. + /// + [Newtonsoft.Json.JsonProperty("customStr5", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CustomStr5 { get; set; } + + /// + /// A free custom colum of type decimal with max 4 decimals. + /// + [Newtonsoft.Json.JsonProperty("customDec1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? CustomDec1 { get; set; } + + /// + /// A free custom colum of type decimal with max 4 decimals. + /// + [Newtonsoft.Json.JsonProperty("customDec2", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? CustomDec2 { get; set; } + + /// + /// A free custom colum of type int + /// + [Newtonsoft.Json.JsonProperty("customInt1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? CustomInt1 { get; set; } + + /// + /// A free custom colum of type int + /// + [Newtonsoft.Json.JsonProperty("customInt2", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? CustomInt2 { get; set; } + + /// + /// A free custom colum of type DateTime - in UTC timezone + /// + [Newtonsoft.Json.JsonProperty("customDateTimeUtc1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? CustomDateTimeUtc1 { get; set; } + } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] @@ -1162,7 +1416,8 @@ public partial class NewSalesOrderLineDto /// /// Sets the description of the order line item. This will override the default description from the inventory item - ///
<br>Note that text fields should not contain any personally identifiable or otherwise sensitive data + ///
+ ///
Note that text fields should not contain any personally identifiable or otherwise sensitive data ///
[Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(256)] @@ -1177,7 +1432,9 @@ public partial class NewSalesOrderLineDto /// /// The way the line item should be shipped. This will override the default or the one set on the order head. - ///
<br>One of the following options can be set:<br><list type="bullet"><item><term>CancelRemainder: </term><description>The ordered quantity should be delivered in one shipment</description></item><item><term>BackOrderAllowed: </term><description>The ordered quantity can be delivered in multiple shipments.</description></item><item><term>ShipComplete: </term><description>The ordered quantity should be delivered in one shipment.</description></item></list> + ///
+ ///
One of the following options can be set: + ///
<list type="bullet"><item><term>CancelRemainder: </term><description>The ordered quantity should be delivered in one shipment</description></item><item><term>BackOrderAllowed: </term><description>The ordered quantity can be delivered in multiple shipments.</description></item><item><term>ShipComplete: </term><description>The ordered quantity should be delivered in one shipment.</description></item></list> ///
[Newtonsoft.Json.JsonProperty("shippingRule", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ShippingRule { get; set; } @@ -1375,8 +1632,7 @@ public partial class NewSalesOrderLineDto /// /// <remarks> - ///
If the actual value was provided as (null), the value will be set from the inventory item preferred supplier, - ///
can be set only if the Purchase Order Source is set to `dropShip` or `purchaseToOrder` + ///
If the actual value was provided as (null), the value will be set from the inventory item preferred supplier. ///
</remarks> ///
[Newtonsoft.Json.JsonProperty("supplierId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -1402,6 +1658,46 @@ public partial class NewSalesOrderLineDto [Newtonsoft.Json.JsonProperty("isRotRutDeductible", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? IsRotRutDeductible { get; set; } + /// + /// Sort order for line. Lines with provided sort order will be prioritized over lines without sort order. + ///
Lines without sort order will be placed after lines with sort order. + ///
Sort order will be automatically changed to consecutive numbers starting from 1. + ///
+ [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? SortOrder { get; set; } + + /// + /// The line number of the original invoice to be returned + /// + [Newtonsoft.Json.JsonProperty("invoiceLineNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? InvoiceLineNumber { get; set; } + + /// + /// The reference number of the original invoice to be returned + /// + [Newtonsoft.Json.JsonProperty("invoiceNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(15)] + public string InvoiceNumber { get; set; } + + /// + /// The invoice type of the original invoice to be returned + ///
+ ///
One of the following options can be set: + ///
<list type="bullet"><item><term>Invoice</term></item><item><term>CreditNote</term></item><item><term>CashSales</term></item><item><term>CashReturn</term></item><item><term>DebitNote</term></item></list> + ///
+ [Newtonsoft.Json.JsonProperty("invoiceType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string InvoiceType { get; set; } + + [Newtonsoft.Json.JsonProperty("customFields", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public NewSalesOrderCustomFieldsDto CustomFields { get; set; } + + /// + /// Sets the alternate id for the inventory item on the line. + ///
If the actual value was provided as (null), the value will be set from the inventory item alternate id predicates. + ///
+ [Newtonsoft.Json.JsonProperty("inventoryAlternateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string InventoryAlternateId { get; set; } + } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] @@ -1666,14 +1962,15 @@ public partial class PatchSalesOrderCommand /// /// Description for the order - ///
<br>Note that text fields should not contain any personally identifiable or otherwise sensitive data + ///
+ ///
Note that text fields should not contain any personally identifiable or otherwise sensitive data ///
[Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(255)] public string Description { get; set; } /// - /// Sets the status for the order. Must be "Open", "Hold", "BackOrder", "Cancelled". When status is set, no other fields may be patched in the same call + /// Sets the status for the order. Must be "Open", "Hold", "BackOrder", "Cancelled", "Completed". When status is set, no other fields may be patched in the same call /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } @@ -1752,6 +2049,7 @@ public partial class PatchSalesOrderCommand /// /// Sets the type code for the original sales order + ///
If order is deleted and the field contains a order type/order number used as quote and is in status Complete, the original quote order will be reset to Open status ///
[Newtonsoft.Json.JsonProperty("originalOrderType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2)] @@ -1759,6 +2057,7 @@ public partial class PatchSalesOrderCommand /// /// Sets the unique identifier of the original order + ///
If order is deleted and the field contains a order type/order number used as quote and is in status Complete, the original quote order will be reset to Open status ///
[Newtonsoft.Json.JsonProperty("originalOrderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(15)] @@ -1780,6 +2079,9 @@ public partial class PatchSalesOrderCommand [Newtonsoft.Json.JsonProperty("rotRutDetails", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public PatchSalesOrderRotRutDetailsDto RotRutDetails { get; set; } + [Newtonsoft.Json.JsonProperty("customFields", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public PatchSalesOrderCustomFieldsDto CustomFields { get; set; } + } /// @@ -1811,12 +2113,15 @@ public partial class PatchSalesOrderContactDto public string Phone1 { get; set; } /// - /// Sets the e-mail address of the contact + /// Sets the e-mail address of the contact, multiple e-mails can be separated by semicolon /// [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(255)] public string Email { get; set; } + [Newtonsoft.Json.JsonProperty("emails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Emails { get; set; } + /// /// Whether this contact overrides the default contact /// @@ -1825,6 +2130,76 @@ public partial class PatchSalesOrderContactDto } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class PatchSalesOrderCustomFieldsDto + { + /// + /// A free custom colum of type string with max length 100. + /// + [Newtonsoft.Json.JsonProperty("customStr1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(100)] + public string CustomStr1 { get; set; } + + /// + /// A free custom colum of type string with max length 100. + /// + [Newtonsoft.Json.JsonProperty("customStr2", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(100)] + public string CustomStr2 { get; set; } + + /// + /// A free custom colum of type string with max length 100. + /// + [Newtonsoft.Json.JsonProperty("customStr3", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(100)] + public string CustomStr3 { get; set; } + + /// + /// A free custom colum of type string with max length 100. + /// + [Newtonsoft.Json.JsonProperty("customStr4", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(100)] + public string CustomStr4 { get; set; } + + /// + /// A free custom colum of type string with max length 100. + /// + [Newtonsoft.Json.JsonProperty("customStr5", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(100)] + public string CustomStr5 { get; set; } + + /// + /// A free custom colum of type decimal with max 4 decimals. + /// + [Newtonsoft.Json.JsonProperty("customDec1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? CustomDec1 { get; set; } + + /// + /// A free custom colum of type decimal with max 4 decimals. + /// + [Newtonsoft.Json.JsonProperty("customDec2", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? CustomDec2 { get; set; } + + /// + /// A free custom colum of type int + /// + [Newtonsoft.Json.JsonProperty("customInt1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? CustomInt1 { get; set; } + + /// + /// A free custom colum of type int + /// + [Newtonsoft.Json.JsonProperty("customInt2", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? CustomInt2 { get; set; } + + /// + /// A free custom colum of type DateTime - in UTC timezone + /// + [Newtonsoft.Json.JsonProperty("customDateTimeUtc1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? CustomDateTimeUtc1 { get; set; } + + } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class PatchSalesOrderCustomerDto { @@ -1962,7 +2337,8 @@ public partial class PatchSalesOrderLineDto /// /// Sets the description of the order line item. This will override the default description from the inventory item - ///
<br>Note that text fields should not contain any personally identifiable or otherwise sensitive data + ///
+ ///
Note that text fields should not contain any personally identifiable or otherwise sensitive data ///
[Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(256)] @@ -1970,7 +2346,9 @@ public partial class PatchSalesOrderLineDto /// /// The way the line item should be shipped. - ///
<br>One of the following options can be set:<br><list type="bullet"><item><term>CancelRemainder: </term><description>The ordered quantity should be delivered in one shipment</description></item><item><term>BackOrderAllowed: </term><description>The ordered quantity can be delivered in multiple shipments.</description></item><item><term>ShipComplete: </term><description>The ordered quantity should be delivered in one shipment.</description></item></list> + ///
+ ///
One of the following options can be set: + ///
<list type="bullet"><item><term>CancelRemainder: </term><description>The ordered quantity should be delivered in one shipment</description></item><item><term>BackOrderAllowed: </term><description>The ordered quantity can be delivered in multiple shipments.</description></item><item><term>ShipComplete: </term><description>The ordered quantity should be delivered in one shipment.</description></item></list> ///
[Newtonsoft.Json.JsonProperty("shippingRule", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ShippingRule { get; set; } @@ -2176,7 +2554,7 @@ public partial class PatchSalesOrderLineDto public string PurchaseOrderSource { get; set; } /// - /// Sets the Purchase Order Vendor for the line, can be set if the purchase order source is `purchaseToOrder` or `dropShip`. + /// Sets the Purchase Order Vendor for the line. /// [Newtonsoft.Json.JsonProperty("supplierId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string SupplierId { get; set; } @@ -2200,6 +2578,37 @@ public partial class PatchSalesOrderLineDto [Newtonsoft.Json.JsonProperty("isRotRutDeductible", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool? IsRotRutDeductible { get; set; } + /// + /// The line number of the original invoice to be returned + /// + [Newtonsoft.Json.JsonProperty("invoiceLineNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? InvoiceLineNumber { get; set; } + + /// + /// The reference number of the original invoice to be returned + /// + [Newtonsoft.Json.JsonProperty("invoiceNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(15)] + public string InvoiceNumber { get; set; } + + /// + /// The invoice type of the original invoice to be returned + ///
+ ///
One of the following options can be set: + ///
<list type="bullet"><item><term>Invoice</term></item><item><term>CreditNote</term></item><item><term>CashSales</term></item><item><term>CashReturn</term></item><item><term>DebitNote</term></item></list> + ///
+ [Newtonsoft.Json.JsonProperty("invoiceType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string InvoiceType { get; set; } + + [Newtonsoft.Json.JsonProperty("customFields", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public PatchSalesOrderCustomFieldsDto CustomFields { get; set; } + + /// + /// Sets the alternate id for the inventory item on the line. + /// + [Newtonsoft.Json.JsonProperty("inventoryAlternateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string InventoryAlternateId { get; set; } + } /// @@ -2380,6 +2789,77 @@ public partial class PatchSalesOrderShippingDto } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class PaymentDto + { + /// + /// The type of payment document that is applied to the sales order + /// + [Newtonsoft.Json.JsonProperty("documentType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string DocumentType { get; set; } + + /// + /// The reference number of the payment document + /// + [Newtonsoft.Json.JsonProperty("referenceNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ReferenceNumber { get; set; } + + /// + /// The amount of the payment applied to the order + /// + [Newtonsoft.Json.JsonProperty("amountAppliedToOrder", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double AmountAppliedToOrder { get; set; } + + /// + /// The amount of the payment that is applied to the order and transferred to related invoice(s) + /// + [Newtonsoft.Json.JsonProperty("billedAmount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double BilledAmount { get; set; } + + /// + /// The total amount of the payment + /// + [Newtonsoft.Json.JsonProperty("totalAmount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double TotalAmount { get; set; } + + /// + /// The balance of the payment + /// + [Newtonsoft.Json.JsonProperty("balance", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Balance { get; set; } + + /// + /// The status of the payment + /// + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Status { get; set; } + + /// + /// The external reference number of the payment + /// + [Newtonsoft.Json.JsonProperty("reference", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reference { get; set; } + + /// + /// The payment method of the payment + /// + [Newtonsoft.Json.JsonProperty("paymentMethod", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PaymentMethod { get; set; } + + /// + /// The cash account of the payment + /// + [Newtonsoft.Json.JsonProperty("cashAccount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CashAccount { get; set; } + + /// + /// The currency for the payment + /// + [Newtonsoft.Json.JsonProperty("currencyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CurrencyId { get; set; } + + } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class ProblemDetails { @@ -2672,14 +3152,6 @@ public partial class SalesOrderDto [Newtonsoft.Json.JsonProperty("requestOn", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset? RequestOn { get; set; } - /// - /// Whether the order is ROT/RUT deductible - ///
<remarks>This will be removed in the future ! Use IsRotRutDeductible instead.</remarks> - ///
- [Newtonsoft.Json.JsonProperty("isRotRutDeductable", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.Obsolete] - public bool IsRotRutDeductable { get; set; } - /// /// Whether the order is ROT/RUT deductible /// @@ -2786,6 +3258,9 @@ public partial class SalesOrderDto [Newtonsoft.Json.JsonProperty("emailed", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool Emailed { get; set; } + [Newtonsoft.Json.JsonProperty("customFields", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CustomFieldsDto CustomFields { get; set; } + } /// @@ -2828,8 +3303,11 @@ public enum SalesOrderExpansions [System.Runtime.Serialization.EnumMember(Value = @"Attachments")] Attachments = 10, + [System.Runtime.Serialization.EnumMember(Value = @"CustomFields")] + CustomFields = 11, + [System.Runtime.Serialization.EnumMember(Value = @"All")] - All = 11, + All = 12, } @@ -3035,6 +3513,12 @@ public partial class SalesOrderLineDto [Newtonsoft.Json.JsonProperty("lineTotalBeforeDiscount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? LineTotalBeforeDiscount { get; set; } + /// + /// The excise duty amount for this line + /// + [Newtonsoft.Json.JsonProperty("exciseDuty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? ExciseDuty { get; set; } + /// /// The discount amount for this line /// @@ -3202,6 +3686,7 @@ public partial class SalesOrderLineDto public SupplierDto Supplier { get; set; } [Newtonsoft.Json.JsonProperty("supplierPrice", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.Obsolete] public double SupplierPrice { get; set; } /// @@ -3234,6 +3719,36 @@ public partial class SalesOrderLineDto [Newtonsoft.Json.JsonProperty("rotRutItemType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public CdDescriptionPairDto RotRutItemType { get; set; } + /// + /// Indicates if an order line of issue type will automatically be created after the order line of receipt type has been processed. + /// + [Newtonsoft.Json.JsonProperty("autoCreateIssue", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool AutoCreateIssue { get; set; } + + /// + /// The line number of the original invoice to be returned + /// + [Newtonsoft.Json.JsonProperty("invoiceLineNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? InvoiceLineNumber { get; set; } + + /// + /// The reference number of the original invoice to be returned + /// + [Newtonsoft.Json.JsonProperty("invoiceNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string InvoiceNumber { get; set; } + + /// + /// The invoice type of the original invoice to be returned + /// + [Newtonsoft.Json.JsonProperty("invoiceType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string InvoiceType { get; set; } + + [Newtonsoft.Json.JsonProperty("kitAssembly", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public KitAssemblyDto KitAssembly { get; set; } + + [Newtonsoft.Json.JsonProperty("customFields", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CustomFieldsDto CustomFields { get; set; } + } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] @@ -3528,14 +4043,6 @@ public partial class SalesOrderRotRutDto [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Type { get; set; } - /// - /// The apartment reference - ///
<remarks>This will be removed in the future ! Use Apartment instead.</remarks> - ///
- [Newtonsoft.Json.JsonProperty("appartment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.Obsolete] - public string Appartment { get; set; } - /// /// The apartment reference /// @@ -3658,6 +4165,12 @@ public partial class SalesOrderShipmentDto [Newtonsoft.Json.JsonProperty("inventoryReferenceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string InventoryReferenceId { get; set; } + /// + /// The status of the shipment + /// + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Status { get; set; } + } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] @@ -3948,6 +4461,18 @@ public partial class SalesOrderTotalsDto [Newtonsoft.Json.JsonProperty("unshippedAmountInBaseCurrency", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double UnshippedAmountInBaseCurrency { get; set; } + /// + /// The total amount of payments connected to the order in the order currency + /// + [Newtonsoft.Json.JsonProperty("paymentTotal", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? PaymentTotal { get; set; } + + /// + /// The total amount of payments connected to the order in the base currency + /// + [Newtonsoft.Json.JsonProperty("paymentTotalInBaseCurrency", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? PaymentTotalInBaseCurrency { get; set; } + } /// @@ -4011,12 +4536,30 @@ public partial class SalesPersonDto [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SupplierDto { + /// + /// The id of the supplier selected for the order line + /// [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Id { get; set; } + /// + /// The name of the supplier selected for the order line + /// [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Name { get; set; } + /// + /// The currency of the supplier selected for the order line + /// + [Newtonsoft.Json.JsonProperty("currencyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CurrencyId { get; set; } + + /// + /// The supplier price of the supplier selected for the order line + /// + [Newtonsoft.Json.JsonProperty("price", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Price { get; set; } + } /// @@ -4138,6 +4681,12 @@ public partial class WarehouseAvailabilityDto [Newtonsoft.Json.JsonProperty("locations", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Locations { get; set; } + /// + /// LOT/Serial information + /// + [Newtonsoft.Json.JsonProperty("lotSerials", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection LotSerials { get; set; } + } From 70d732d07adfd57a38eca85f9f016029a36184c0 Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Tue, 11 Feb 2025 09:52:46 +0100 Subject: [PATCH 36/37] Upgrade of depencencies --- Visma.Net.SalesOrderNG/Visma.Net.SalesOrderNG.csproj | 2 +- Visma.Net.SalesOrderNG/Visma.net.SalesOrder.nswag | 9 +++++---- Visma.net/Visma.net.csproj | 8 ++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Visma.Net.SalesOrderNG/Visma.Net.SalesOrderNG.csproj b/Visma.Net.SalesOrderNG/Visma.Net.SalesOrderNG.csproj index 31cdda9..68f1d3f 100644 --- a/Visma.Net.SalesOrderNG/Visma.Net.SalesOrderNG.csproj +++ b/Visma.Net.SalesOrderNG/Visma.Net.SalesOrderNG.csproj @@ -9,7 +9,7 @@ - + diff --git a/Visma.Net.SalesOrderNG/Visma.net.SalesOrder.nswag b/Visma.Net.SalesOrderNG/Visma.net.SalesOrder.nswag index 0fe882a..249d0e9 100644 --- a/Visma.Net.SalesOrderNG/Visma.net.SalesOrder.nswag +++ b/Visma.Net.SalesOrderNG/Visma.net.SalesOrder.nswag @@ -3,7 +3,7 @@ "defaultVariables": null, "documentGenerator": { "fromDocument": { - "json": "{\r\n \"openapi\": \"3.0.1\",\r\n \"info\": {\r\n \"title\": \"Visma.net.ERP.SalesOrders.Api\",\r\n \"version\": \"1.0.14.746\"\r\n },\r\n \"servers\": [\r\n {\r\n \"url\": \"/\"\r\n }\r\n ],\r\n \"paths\": {\r\n \"/api/v3/Customers/{customerId}/locations\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"Customers\"\r\n ],\r\n \"summary\": \"Gets a list of locations for the specified customer\",\r\n \"description\": \"Sample rquest:\\r\\n \\r\\nGET /customers/10000/locations\",\r\n \"operationId\": \"Customers_GetCustomerLocationList_customerIdlocations\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"customerId\",\r\n \"in\": \"path\",\r\n \"description\": \"The customer id (CustomerCd) to retrieve locations for\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"List of locations for the specified customer\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationItemDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationItemDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationItemDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If customer with id customerId is not found or is not accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/Customers\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"Customers\"\r\n ],\r\n \"summary\": \"Gets a list of customers\",\r\n \"description\": \"Sample request:\\r\\n \\r\\nGET /customers?filter=visma&pageSize=10\",\r\n \"operationId\": \"Customers_GetList_\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"filter\",\r\n \"in\": \"query\",\r\n \"description\": \"An optional text string to find customers matching (searching fields id, name, gln, tax registration id). If not specified all customers are returned.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of customers retrieved per page. If not specified, the default value of 100 will be used.\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 100\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"The zero based page index to retrieve\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 0\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Returns the list of customers found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/CustomerDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/CustomerDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/CustomerDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If pageSize or pageIndex is not within the allowed range\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/Inventory\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"Inventory\"\r\n ],\r\n \"summary\": \"Gets an inventory summary for inventory items.\",\r\n \"description\": \"Sample request:\\r\\n \\r\\nGET /inventory?inventoryId=Item1\\r\\n \\r\\nGET /inventory?warehouseId=MAIN&modifiedSince=2021-08-01T12:00:00&pageSize=1000\\r\\n \\r\\nGET /inventory?inventoryId=Item1&InventoryId=Item2&expand=location,attribute\\r\\n \\r\\nGET /inventory?expand=location&attributeFilter=WEBSHOP:1\",\r\n \"operationId\": \"Inventory_GetList_\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"inventoryId\",\r\n \"in\": \"query\",\r\n \"description\": \"A list of zero or more inventory items to get a summary for. If no inventoryId is passed, all inventory items will be included in the response.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"warehouseId\",\r\n \"in\": \"query\",\r\n \"description\": \"A list of zero or more warehouses to get a summary for. If no warehouse is supplied, all warehouses will be included in the response.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"locationId\",\r\n \"in\": \"query\",\r\n \"description\": \"A list of zero or more locations to get a summary for. If no location is supplied, all locations will be included in the response.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"expand\",\r\n \"in\": \"query\",\r\n \"description\": \"An additional option to include location detail information with the warehouse summary, or attribute details for the inventory item. If this is not supplied, location information or attributes will not be included in the response.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/InventoryAvailabilityExpansions\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"modifiedSince\",\r\n \"in\": \"query\",\r\n \"description\": \"A date/time value for filtering when an inventory item's warehouse or location availability last changed\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n {\r\n \"name\": \"attributeFilter\",\r\n \"in\": \"query\",\r\n \"description\": \"One or more attribute filter values specified as attribute-id:attribute-value. For example \\\"attributeFilter=WEBSHOP:1&attributeFilter=AnotherAttribute:someValue\\\"\\r\\nIf two attributeFilter values have the same attribute-Id either one need to match.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of inventory items retrieved per page. If not specified the default pagesize is 10000 items per page\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"Gets or sets the zero based page index to get\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Returns list of inventory items found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/InventoryItemAvailabilityDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/InventoryItemAvailabilityDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/InventoryItemAvailabilityDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If modifiedSince is an invalid date, if expand contains an invalid value, or if any of the supplied attributeFilter(s) are invalid\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets information about a single sales order\",\r\n \"description\": \"The expand query parameter corresponds to sections in the Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDto.\\r\\nIf an expand value is not specified it will not be filled and returned in the response object.\\r\\n \\r\\nSample request:\\r\\n \\r\\n`GET /salesorders/SO/000100?expand=customer,payment`\",\r\n \"operationId\": \"SalesOrders_GetItemAsync_typeorderId\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"expand\",\r\n \"in\": \"query\",\r\n \"description\": \"An optional specification of what details to include about the sales order. The default value if not supplied is \\\"None\\\"\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderExpansions\"\r\n }\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDto\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDto\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDto\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"patch\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Make modifications to an existing sales order\",\r\n \"description\": \"If-Match header represents a version of Sales Order to be modified and must be included in request.\\r\\nValue of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header.\",\r\n \"operationId\": \"SalesOrders_Patch_typeorderId\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of the order to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The order number to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"requestBody\": {\r\n \"description\": \"Data to change about the sales order\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderCommand\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderCommand\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderCommand\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The order was modified successfully\"\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in command is outside the allowed range\\r\\n See #/components/x-visma-erp-error-codes for the full list of error codes.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"The order specified was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"412\": {\r\n \"description\": \"Order version does not match with If-Match header\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"428\": {\r\n \"description\": \"If-Match header was not supplied\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"409\": {\r\n \"description\": \"Conflict\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"delete\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Delete an existing sales order\",\r\n \"description\": \"If-Match header represents a version of Sales Order to be modified and must be included in request.\\r\\nValue of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header.\",\r\n \"operationId\": \"SalesOrders_Delete_typeorderId\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of the order to delete\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The order number to delete\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The order was deleted successfully\"\r\n },\r\n \"400\": {\r\n \"description\": \"Bad Request\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Specified order was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets a paged list with sales orders of a specific type\",\r\n \"description\": \"Sample requests:\\r\\n \\r\\n`GET /salesorders/SO`\\r\\n \\r\\n`GET /salesorders/SO?customerId=10000&status=Open&pageSize=10`\\r\\n \\r\\n`GET /salesorders/SO?orderBy=created%20desc`\",\r\n \"operationId\": \"SalesOrders_GetList_type\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales orders to get.\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"customerId\",\r\n \"in\": \"query\",\r\n \"description\": \"The customer for which to retrieve orders. If omitted or empty, orders for all customers are included\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"status\",\r\n \"in\": \"query\",\r\n \"description\": \"The order status to include in the result. If omitted or empty, orders with any status are included.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"modifiedSince\",\r\n \"in\": \"query\",\r\n \"description\": \"A date/time value for filtering when a sales order last changed.\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of customers retrieved per page\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 100\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"The zero based page index to retrieve\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 0\r\n }\r\n },\r\n {\r\n \"name\": \"orderBy\",\r\n \"in\": \"query\",\r\n \"description\": \"The field to order the list by. Can be one of `created`, `lastModified`, or `orderId` followed by an optional sort direction (`asc` or `desc`), default direction is `asc` (ascending) if not present.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"filter\",\r\n \"in\": \"query\",\r\n \"description\": \"A filter for the list, applied to the orderId\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Returns a list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderListDto found.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If `pageSize` or `pageIndex` is not within the allowed range, or if an invalid `orderBy` is specified\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets a paged list with sales orders of any type\",\r\n \"description\": \"Sample requests:\\r\\n \\r\\n`GET /salesorders`\\r\\n \\r\\n`GET /salesorders?customerId=10000&status=Open&pageSize=10`\\r\\n \\r\\n`GET /salesorders?orderBy=lastModified%20asc`\",\r\n \"operationId\": \"SalesOrders_GetList_\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"customerId\",\r\n \"in\": \"query\",\r\n \"description\": \"The customer for which to retrieve orders. If omitted or empty, orders for all customers are included\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"status\",\r\n \"in\": \"query\",\r\n \"description\": \"The order status to include in the result. If omitted or empty, orders with any status are included.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"modifiedSince\",\r\n \"in\": \"query\",\r\n \"description\": \"A date/time value for filtering when a sales order last changed.\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of customers retrieved per page\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 100\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"The zero based page index to retrieve\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 0\r\n }\r\n },\r\n {\r\n \"name\": \"orderBy\",\r\n \"in\": \"query\",\r\n \"description\": \"The field to order the list by. Can be one of `created`, `lastModified`, or `orderId` followed by an optional sort direction (`asc` or `desc`), default direction is `asc` (ascending) if not present.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"filter\",\r\n \"in\": \"query\",\r\n \"description\": \"A filter for the list, applied to the orderId\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Returns a list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderListDto found.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If `pageSize` or `pageIndex` is not within the allowed range, or if an invalid `orderBy` is specified\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"post\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Adds a new sales order to the system\",\r\n \"description\": \"Sample requests:\\r\\n \\r\\n```\\r\\nPOST /salesorders\\r\\n{\\r\\n \\\"customer\\\": {\\r\\n \\\"id\\\": \\\"10001\\\",\\r\\n },\\r\\n \\\"type\\\": \\\"SO\\\"\\r\\n}\\r\\n```\\r\\n```\\r\\nPOST /salesorders\\r\\n{\\r\\n \\\"customer\\\": {\\r\\n \\\"id\\\": \\\"10000\\\",\\r\\n \\\"order\\\": \\\"some-customer-order-nbr\\\"\\r\\n },\\r\\n \\\"type\\\": \\\"SO\\\",\\r\\n \\\"description\\\": \\\"sample request order\\\",\\r\\n \\\"status\\\": \\\"Hold\\\",\\r\\n \\\"orderLines\\\": [\\r\\n {\\r\\n \\\"inventoryId\\\": \\\"StockItem1\\\",\\r\\n \\\"quantity\\\": 4,\\r\\n \\\"unitPrice\\\": 101.25\\r\\n }\\r\\n ]\\r\\n}\\r\\n```\",\r\n \"operationId\": \"SalesOrders_CreateNewItem_\",\r\n \"requestBody\": {\r\n \"description\": \"Information about the sales order to create\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderCommand\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderCommand\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderCommand\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"201\": {\r\n \"description\": \"The order was created successfully, and the Location request header contains the address to call to GET the new sales order\",\r\n \"headers\": {\r\n \"Location\": {\r\n \"description\": \"Location of the newly created resource\",\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location of the newly created resource\",\r\n \"format\": \"\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in command is not present or active, or is outside the allowed range\\r\\n See #/components/x-visma-erp-error-codes for the full list of error codes.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"409\": {\r\n \"description\": \"Conflict\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/rotrut\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets ROT/RUT information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000123/rotrut`\",\r\n \"operationId\": \"SalesOrders_GetItemRotRut_typeorderIdrotrut\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderRotRutDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderRotRutDto\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderRotRutDto\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderRotRutDto\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/commissions\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets commission information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/commissions`\",\r\n \"operationId\": \"SalesOrders_GetItemCommissions_typeorderIdcommissions\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderCommissionDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderCommissionDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderCommissionDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderCommissionDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/lines\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets sales order lines for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/lines`\",\r\n \"operationId\": \"SalesOrders_GetItemLines_typeorderIdlines\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of lines retrieved per page, defaults to 1000 if not specified\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 1000\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"The zero based page index to retrieve, defaults to 0 if not specified\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 0\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.PagedResult`1 object if sales order is found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"patch\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Make modifications to an existing sales order lines\",\r\n \"description\": \"If-Match header represents a version of Sales Order to be modified and must be included in request.\\r\\nValue of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header.\",\r\n \"operationId\": \"SalesOrders_PatchLines_typeorderIdlines\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of the order to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The order number to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"requestBody\": {\r\n \"description\": \"Data to change about the sales order lines\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderLinesCommand\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderLinesCommand\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderLinesCommand\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The order was modified successfully\"\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in command is outside the allowed range\\r\\n See #/components/x-visma-erp-error-codes for the full list of error codes.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"The order specified was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"412\": {\r\n \"description\": \"Order version does not match with If-Match header\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"428\": {\r\n \"description\": \"If-Match header was not supplied\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"delete\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Delete lines from an existing sales order\",\r\n \"description\": \"If-Match header represents a version of Sales Order to be modified and must be included in request.\\r\\nValue of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header.\",\r\n \"operationId\": \"SalesOrders_DeleteLines_typeorderIdlines\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of the order to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The order number to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"ids\",\r\n \"in\": \"query\",\r\n \"description\": \"Lines to delete with comma seprator. Limit of line ids is 1000.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The lines were deleted successfully\"\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in ids is outside the allowed range\\r\\n See #/components/x-visma-erp-error-codes for the full list of error codes.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Specified order was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"post\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Adds new lines to a existing sales order in the system\",\r\n \"description\": \"If-Match header represents a version of Sales Order to be modified and must be included in request.\\r\\nValue of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header.\",\r\n \"operationId\": \"SalesOrders_AddLines_typeorderIdlines\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"requestBody\": {\r\n \"description\": \"Information about the lines to create\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AddSalesOrderLinesCommand\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AddSalesOrderLinesCommand\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AddSalesOrderLinesCommand\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The order lines where created successfully, and the Location request header contains the address to call to GET the new sales order\"\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in command is not present or active, or is outside the allowed range\\r\\n Specified order was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Not Found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/lines/{lineId}\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets a specific sales order line for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/lines/1`\",\r\n \"operationId\": \"SalesOrders_GetItemLine_typeorderIdlineslineId\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"lineId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the line to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderLineDto object if sales order line is found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDto\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDto\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDto\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible\\r\\n or the line with the id lineId is not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/tax\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets tax information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/tax`\",\r\n \"operationId\": \"SalesOrders_GetItemTax_typeorderIdtax\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderTaxDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderTaxDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderTaxDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderTaxDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/shipment\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets shipment information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/shipment`\",\r\n \"operationId\": \"SalesOrders_GetSalesOrderShipment_typeorderIdshipment\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderShipmentDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderShipmentDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderShipmentDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderShipmentDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/discounts\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets discount details information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/discounts`\",\r\n \"operationId\": \"SalesOrders_GetItemDiscounts_typeorderIddiscounts\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDiscountDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDiscountDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDiscountDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDiscountDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"components\": {\r\n \"schemas\": {\r\n \"AddSalesOrderLinesCommand\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lines\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderLineDto\"\r\n },\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"AddressDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The address id\",\r\n \"format\": \"int32\"\r\n },\r\n \"overridesDefault\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this address overrides the default address\"\r\n },\r\n \"line1\": {\r\n \"type\": \"string\",\r\n \"description\": \"Address line 1\",\r\n \"nullable\": true\r\n },\r\n \"line2\": {\r\n \"type\": \"string\",\r\n \"description\": \"Address line 2\",\r\n \"nullable\": true\r\n },\r\n \"line3\": {\r\n \"type\": \"string\",\r\n \"description\": \"Address line 3\",\r\n \"nullable\": true\r\n },\r\n \"postalCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"The postal code\",\r\n \"nullable\": true\r\n },\r\n \"city\": {\r\n \"type\": \"string\",\r\n \"description\": \"The city\",\r\n \"nullable\": true\r\n },\r\n \"country\": {\r\n \"$ref\": \"#/components/schemas/CdNamePairDto\"\r\n },\r\n \"county\": {\r\n \"$ref\": \"#/components/schemas/CdNamePairDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CdDescriptionPairDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CdNamePairDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"The name\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"ContactDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The id of the contact\",\r\n \"format\": \"int32\"\r\n },\r\n \"overridesDefault\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this overrides the default contact\"\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"The name of the contact\",\r\n \"nullable\": true\r\n },\r\n \"attention\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any attention for the contact\",\r\n \"nullable\": true\r\n },\r\n \"email\": {\r\n \"type\": \"string\",\r\n \"description\": \"The e-mail address of the contact\",\r\n \"nullable\": true\r\n },\r\n \"phone1\": {\r\n \"type\": \"string\",\r\n \"description\": \"The phone number of the contact\",\r\n \"nullable\": true\r\n },\r\n \"phone2\": {\r\n \"type\": \"string\",\r\n \"description\": \"The secondary phone number of the contact\",\r\n \"nullable\": true\r\n },\r\n \"fax\": {\r\n \"type\": \"string\",\r\n \"description\": \"The fax number of the contact\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CustomerDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal unique id\",\r\n \"format\": \"int32\"\r\n },\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"Unique id for the customer\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"The name of the customer\",\r\n \"nullable\": true\r\n },\r\n \"currencyId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The currency Id used by the customer\",\r\n \"nullable\": true\r\n },\r\n \"customerClassId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The class of the customer\",\r\n \"nullable\": true\r\n },\r\n \"defaultLocation\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationDto\"\r\n },\r\n \"addressLine1\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's first address line\",\r\n \"nullable\": true\r\n },\r\n \"addressLine2\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's second address line\",\r\n \"nullable\": true\r\n },\r\n \"postalCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's postal code\",\r\n \"nullable\": true\r\n },\r\n \"country\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's country code\",\r\n \"nullable\": true\r\n },\r\n \"salutation\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's salutation\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's status code\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.CustomerDto class Defines a customer\"\r\n },\r\n \"CustomerDtoPagedResult\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"value\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/CustomerDto\"\r\n },\r\n \"description\": \"Gets or sets the items that are paged\",\r\n \"nullable\": true\r\n },\r\n \"nextPage\": {\r\n \"type\": \"string\",\r\n \"description\": \"Gets or sets the link to the next page with more results. If set to null then no more records are present.\",\r\n \"nullable\": true\r\n },\r\n \"totalCount\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CustomerLocationDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location id\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location description\",\r\n \"nullable\": true\r\n },\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal id of the customer location\",\r\n \"format\": \"int32\"\r\n },\r\n \"countryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The country code of the location\",\r\n \"nullable\": true\r\n },\r\n \"gln\": {\r\n \"type\": \"string\",\r\n \"description\": \"The global localization number of the location\",\r\n \"nullable\": true\r\n },\r\n \"taxRegistrationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The tax registration id of the location\",\r\n \"nullable\": true\r\n },\r\n \"corporateId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The corporate id of the location\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The site id of the location\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CustomerLocationItemDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location id\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location description\",\r\n \"nullable\": true\r\n },\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal id of the customer location\",\r\n \"format\": \"int32\"\r\n },\r\n \"countryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The country code of the location\",\r\n \"nullable\": true\r\n },\r\n \"gln\": {\r\n \"type\": \"string\",\r\n \"description\": \"The global localization number of the location\",\r\n \"nullable\": true\r\n },\r\n \"taxRegistrationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The tax registration id of the location\",\r\n \"nullable\": true\r\n },\r\n \"corporateId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The corporate id of the location\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The site id of the location\",\r\n \"nullable\": true\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/AddressDto\"\r\n },\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/ContactDto\"\r\n },\r\n \"priceClassId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Price class\",\r\n \"nullable\": true\r\n },\r\n \"fobPointId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Default FobPointId\",\r\n \"nullable\": true\r\n },\r\n \"shipTermsId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Default ShipTermsId\",\r\n \"nullable\": true\r\n },\r\n \"shipZoneId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Default ShipZoneId\",\r\n \"nullable\": true\r\n },\r\n \"shipViaId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The ship via id that represents the carrier and its service to be used for shipping the ordered goods\",\r\n \"nullable\": true\r\n },\r\n \"resedentialDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Default ResidentialDelivery.
\\r\\nThis field will be removed with due date 1.12.2023. It is recommended to use ResidentialDelivery instead.\",\r\n \"deprecated\": true\r\n },\r\n \"residentialDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Default ResidentialDelivery\"\r\n },\r\n \"saturdayDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Default SaturdayDelivery\"\r\n },\r\n \"insurance\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Default Insurance\"\r\n },\r\n \"priority\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Default Priority\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"shippingRule\": {\r\n \"type\": \"string\",\r\n \"description\": \"Shipping rule of the customer set default for the order\\r\\n
Is one of the following options:
CancelRemainder: The ordered quantity should be delivered in one shipmentBackOrderAllowed: The ordered quantity can be delivered in multiple shipments.ShipComplete: The ordered quantity should be delivered in one shipment.\",\r\n \"nullable\": true\r\n },\r\n \"preferredWarehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The preferred shipping warehouse of the customer set default for the order\",\r\n \"nullable\": true\r\n },\r\n \"leadTime\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The number of days required for the shipped goods to reach the customer.\\r\\nUsed in the calculation of the scheduled shipment date\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"taxZoneId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The location tax/VAT zone id\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"DtoLink\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"href\": {\r\n \"type\": \"string\",\r\n \"description\": \"A link to the item in question\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"EmployeeDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The internal unique identifier of the employee\",\r\n \"nullable\": true\r\n },\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the employee\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"IdDescriptionPairDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The id\",\r\n \"format\": \"int32\"\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"InventoryAvailabilityExpansions\": {\r\n \"enum\": [\r\n \"None\",\r\n \"Location\",\r\n \"Attribute\",\r\n \"All\"\r\n ],\r\n \"type\": \"string\",\r\n \"description\": \"Defines expansion options for the inventory summary endpoint.\"\r\n },\r\n \"InventoryItemAvailabilityDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"inventoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The inventory id (InventoryCd)\",\r\n \"nullable\": true\r\n },\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The internal Id used by the system to identify the inventory item\",\r\n \"format\": \"int32\"\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description of the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"baseUnit\": {\r\n \"type\": \"string\",\r\n \"description\": \"The base unit for the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"availability\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/WarehouseAvailabilityDto\"\r\n },\r\n \"description\": \"Warehouse information for the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"attributes\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"string\"\r\n },\r\n \"description\": \"Attributes applied to the inventory item\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Inventory summary for a specific inventory item\"\r\n },\r\n \"InventoryItemAvailabilityDtoPagedResult\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"value\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/InventoryItemAvailabilityDto\"\r\n },\r\n \"description\": \"Gets or sets the items that are paged\",\r\n \"nullable\": true\r\n },\r\n \"nextPage\": {\r\n \"type\": \"string\",\r\n \"description\": \"Gets or sets the link to the next page with more results. If set to null then no more records are present.\",\r\n \"nullable\": true\r\n },\r\n \"totalCount\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"LocationAvailabilityDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalLocationId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The internal id used by the sytem for this location\",\r\n \"format\": \"int32\"\r\n },\r\n \"locationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The location id (LocationCd) for this location\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description of the location\",\r\n \"nullable\": true\r\n },\r\n \"quantityOnHand\": {\r\n \"type\": \"number\",\r\n \"description\": \"Physical quantity on-hand of items in the specific location\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityAvailable\": {\r\n \"type\": \"number\",\r\n \"description\": \"You can configure the way this estimated quantity is calculated by using availability\\r\\ncalculation rules. The available quantity may include anticipated transactions and therefore\\r\\nmay be less than or greater than the QuantityOnHand. Anticipated transactions correspond\\r\\nto the documents and transactions that have been entered in the system but not yet\\r\\nprocessed to the end.\\r\\nIn the availability calculation settings of an item class, you specify which anticipated\\r\\ntransactions affect the available quantity. Thus, the available quantity may include\\r\\ngoods on purchase orders and exclude the goods allocated for sales orders. You can use\\r\\nthe available quantity as an indicator of demand.\\r\\nNote: For quantities on warehouse location level, only quantities added specifically for the location are taken into consideration in quantityAvailable\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityNotAvailable\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity stored at locations not included in the availability calculation.\\r\\nFor each warehouse location, the 'Include in Qty. Available' check box on the\\r\\nWarehouses(IN204000) screen defines whether the quantity of items stored at this\\r\\nlocation is included in the quantity of available items.\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityAvailableForShipment\": {\r\n \"type\": \"number\",\r\n \"description\": \"Estimated quantity calculated by using the following formula: the QuantityOnHand minus the quantity on unreleased inventory\\r\\nissues, minus the quantity allocated for shipping. Thus, the QuantityAvailableForShipment can be less than the QuantityOnHand.\\r\\nNote: For quantities on warehouse location level, only quantities added specifically for the location are taken into consideration in quantityAvailableForShipment\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityPurchaseOrders\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of the inventory item included in open purchase orders.\\r\\nNote: For quantities on warehouse location level, only quantities added specifically for the location are taken into consideration\",\r\n \"format\": \"double\"\r\n },\r\n \"lastModified\": {\r\n \"type\": \"string\",\r\n \"description\": \"Date and time this entry for this location was modified\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"LocationDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines a warehouse location\"\r\n },\r\n \"NewSalesOrderAddressDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"line1\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 1\",\r\n \"nullable\": true\r\n },\r\n \"line2\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 2\",\r\n \"nullable\": true\r\n },\r\n \"line3\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 3\",\r\n \"nullable\": true\r\n },\r\n \"postalCode\": {\r\n \"maxLength\": 20,\r\n \"type\": \"string\",\r\n \"description\": \"The postal code\",\r\n \"nullable\": true\r\n },\r\n \"city\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"The city\",\r\n \"nullable\": true\r\n },\r\n \"countryId\": {\r\n \"maxLength\": 2,\r\n \"type\": \"string\",\r\n \"description\": \"The country. Required when setting the address.\",\r\n \"nullable\": true\r\n },\r\n \"stateId\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"The state\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines a new address when creating a sales order.\\r\\nWhen the address information is provided, it is expected to provide all needed fields for the address(line1, line2, countryId etc).\\r\\nNo default values from the customer will be set for the non defined address fields.\"\r\n },\r\n \"NewSalesOrderBillingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderContactDto\"\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderAddressDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderCommand\": {\r\n \"required\": [\r\n \"customer\",\r\n \"type\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the type id of an active sales order type to create\"\r\n },\r\n \"orderId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the new id that should be assigned to the new sales order.\\r\\nThis is required if the specified Visma.net.ERP.SalesOrders.Api.Application.Commands.NewSalesOrder.NewSalesOrderCommand.Type has manual numbering set up. If not it should be null or empty.\",\r\n \"nullable\": true\r\n },\r\n \"currencyId\": {\r\n \"maxLength\": 5,\r\n \"type\": \"string\",\r\n \"description\": \"Override the CurrencyId for the order. Must be a valid currency Id. If not specified, the customer's currency is used if not null. If null, company base currency is used\",\r\n \"nullable\": true\r\n },\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the order date of the order to create. If not supplied, the current date will be used\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"requestOn\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the requested on date for the order to create. If not supplied, the current date will be used\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"cancelBy\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the cancel by date for the order to create. If not supplied, the order type's days to keep will be added to the current date to determine the value of this field\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the description for the order to create\\r\\n
Note that text fields should not contain any personally identifiable or otherwise sensitive data\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the initial status code for the order. Must be null, empty or one of \\\"Open\\\" or \\\"Hold\\\". If not supplied the value will be determined by the sales order type.\",\r\n \"nullable\": true\r\n },\r\n \"customer\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderCustomerDto\"\r\n },\r\n \"print\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderPrintDto\"\r\n },\r\n \"shipping\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderShippingDto\"\r\n },\r\n \"billing\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderBillingDto\"\r\n },\r\n \"financialInformation\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderFinancialInfoDto\"\r\n },\r\n \"ownerId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the owner (employee) for the order\",\r\n \"nullable\": true\r\n },\r\n \"orderLines\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderLineDto\"\r\n },\r\n \"description\": \"The lines that are added to the order upon creation\",\r\n \"nullable\": true\r\n },\r\n \"taxZoneId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Override the TaxZoneId for the order. If not specified, the customer's location's TaxZoneId will be used\",\r\n \"nullable\": true\r\n },\r\n \"note\": {\r\n \"maxLength\": 2048,\r\n \"type\": \"string\",\r\n \"description\": \"Any note to apply to the order header.\",\r\n \"nullable\": true\r\n },\r\n \"paymentSettings\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderPaymentSettings\"\r\n },\r\n \"useReplacementCostForMarginAndProfit\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"When this option is set to `true`, the `costTotal` of the order will be calculated based on `replacementUnitCost`.\\r\\nIf option is set to `false`, the `costTotal` will be calculated based on `unitCost`\",\r\n \"nullable\": true\r\n },\r\n \"freight\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderFreightDto\"\r\n },\r\n \"branchId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"The branch with which this order is associated. Prio for setting the Branch ID being:\\r\\nBranchID set in bodyBranchID from call headerBranchID from customer locationCompany's default branch ID\",\r\n \"nullable\": true\r\n },\r\n \"originalOrderType\": {\r\n \"maxLength\": 2,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the type code for the original sales order\",\r\n \"nullable\": true\r\n },\r\n \"originalOrderId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the unique identifier of the original order\",\r\n \"nullable\": true\r\n },\r\n \"salesPersonId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets default sales person for the order\",\r\n \"nullable\": true\r\n },\r\n \"projectId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"The project with which this sales order is associated\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderContactDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"name\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the full name of the contact\",\r\n \"nullable\": true\r\n },\r\n \"attention\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets any attention for the contact\",\r\n \"nullable\": true\r\n },\r\n \"phone1\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the primary phone number of the contact\",\r\n \"nullable\": true\r\n },\r\n \"email\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the e-mail address of the contact\",\r\n \"format\": \"email\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines a new contact when creating a new sales order.\\r\\nWhen the contact information is provided, it is expected to provide all needed fields for the contact(name, attention etc).\\r\\nNo default values from the customer will be set for the non defined contact fields.\"\r\n },\r\n \"NewSalesOrderCustomerDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique id of the the customer\",\r\n \"nullable\": true\r\n },\r\n \"contactId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The contact id for the customer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"order\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"The customer order text\",\r\n \"nullable\": true\r\n },\r\n \"refNo\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"The customer ref number text\",\r\n \"nullable\": true\r\n },\r\n \"locationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the location for the customer supplied to use on the order.\\r\\nMust be a valid active location for the customer supplied in Visma.net.ERP.SalesOrders.Api.Dto.NewSalesOrder.NewSalesOrderCustomerDto.Id\",\r\n \"nullable\": true\r\n },\r\n \"termsId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the terms to use for the sales order.\\r\\nMust be a valid terms identifier\",\r\n \"nullable\": true\r\n },\r\n \"gln\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique global location number of the customer\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderFinancialInfoDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"invoiceSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets if the order should be invoiced/billed separately\",\r\n \"nullable\": true\r\n },\r\n \"invoiceDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the invoice date of the invoice that will be generated for the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"invoiceId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The reference number of the invoice generated for this order.\\r\\nThis can be used if the numbering sequence assigned to invoices is configured for manual numbering.\",\r\n \"nullable\": true\r\n },\r\n \"postPeriod\": {\r\n \"maxLength\": 6,\r\n \"type\": \"string\",\r\n \"description\": \"The post period for the invoice. This can be used to override the financial period. Must be a valid existing financial period.\",\r\n \"nullable\": true\r\n },\r\n \"dueDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The due date for the invoice created for the order. Default due date is set according to the credit terms.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"cashDiscountDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date when the cash discount is available for the invoice created for the order. Default date is set based on the terms selected in the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderFreightDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"cost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight cost calculated for the sales order, can be manually set if orders Ship via code allows it.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"premiumAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The additional freight charges for handling the order.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"taxCategoryId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"The tax category that applies to the freight amount.\\r\\nBy default, it is the tax category associated with the ship via code selected for the order.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderLineDto\": {\r\n \"required\": [\r\n \"inventoryId\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"inventoryId\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\",\r\n \"description\": \"The Inventory Id of the item to add\"\r\n },\r\n \"description\": {\r\n \"maxLength\": 256,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the description of the order line item. This will override the default description from the inventory item\\r\\n
Note that text fields should not contain any personally identifiable or otherwise sensitive data\",\r\n \"nullable\": true\r\n },\r\n \"unitOfMeasure\": {\r\n \"maxLength\": 6,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the Unit of measure for the line item. This will override the default UOM for the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"shippingRule\": {\r\n \"type\": \"string\",\r\n \"description\": \"The way the line item should be shipped. This will override the default or the one set on the order head.\\r\\n
One of the following options can be set:
CancelRemainder: The ordered quantity should be delivered in one shipmentBackOrderAllowed: The ordered quantity can be delivered in multiple shipments.ShipComplete: The ordered quantity should be delivered in one shipment.\",\r\n \"nullable\": true\r\n },\r\n \"quantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the quantity of items on the order line\",\r\n \"format\": \"double\"\r\n },\r\n \"unitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the unit cost of the product on the line. If no cost is set (null or omitted) the cost will be set\\r\\naccording to predefined rules\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"unitPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the unit price for the product on the line.\\r\\nIf no price is set(null or omitted) the price will be set according to predefined rules based on the inventoryId and the customer.\\r\\nNote that the behavior of the `unitPrice` field is affected by the `hasManualPrice` option.\\r\\nIf `hasManualPrice` is provided and set to \\\"false\\\", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"externalLink\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the external link for the line\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the warehouse the item should be shipped from. This will override the default, or the one set on the order head.\",\r\n \"nullable\": true\r\n },\r\n \"reasonCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the reason code for the line. This must be one of the selectable reason codes\",\r\n \"nullable\": true\r\n },\r\n \"taxCategoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the default tax category id (from customer's class). The value must be one of the selectable Tax Categories\",\r\n \"nullable\": true\r\n },\r\n \"undershipThreshold\": {\r\n \"maximum\": 100,\r\n \"minimum\": 0,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the undership threshold in percent. If not set, information from the inventory item is used\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"overshipThreshold\": {\r\n \"maximum\": 999,\r\n \"minimum\": 100,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the overship threshold in percent. If not set, information from the inventory item is used\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"shipDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the day the order line should be shipped, so that the customer gets it on the requested date (Ship On).\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"requestDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the date the order line is requested (Requested On)\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"salesAccountId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the Sales Account Id of the line. The value must be one of the selectable Accounts.\\r\\nIf not set, a value based on the rules is used\",\r\n \"nullable\": true\r\n },\r\n \"subaccount\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"string\"\r\n },\r\n \"description\": \"Overrides the Subaccount setup for the line.\\r\\nEach entry corresponds to a subaccount id/value pair\",\r\n \"nullable\": true\r\n },\r\n \"note\": {\r\n \"maxLength\": 2048,\r\n \"type\": \"string\",\r\n \"description\": \"Adds a text note to the sales order line.\",\r\n \"nullable\": true\r\n },\r\n \"discountCode\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the discount for the line if applicable. This must be one of the selectable discount codes.\\r\\n\\r\\nNote that the behavior of the 'discountCode' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountCode' is provided, the system will set the discountCode according to the predefined rules.\\r\\n\",\r\n \"nullable\": true\r\n },\r\n \"discountPercent\": {\r\n \"maximum\": 100,\r\n \"minimum\": -100,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the manual percentage discount for the line.\\r\\n\\r\\nNote that the behavior of the 'discountPercent' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountPercent' is provided, the system will set the discountPercent according to the predefined rules.\\r\\n\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the manual currency discount amount for the line.\\r\\n\\r\\nNote that the behavior of the 'discountAmount' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountAmount' is provided, the system will set the discountAmount according to the predefined rules.\\r\\n\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"hasManualDiscount\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that line level discount is applied manually.\\r\\n\\r\\nNote that the behavior of the fields 'discountCode', 'discountPercent' and 'discountAmount' is affected by this option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and discount field(s) is provided, the system will set the line level discounts according to the predefined rules.\\r\\n\",\r\n \"nullable\": true\r\n },\r\n \"warehouseLocationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the warehouse location that will be used for the shipment generated for the order the warehouse location Id for this line. This must be a valid location for `warehouseId` and will override the default if set.\",\r\n \"nullable\": true\r\n },\r\n \"operation\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of operation the line represents to the order. Acceptable values are 'Issue' or 'Receipt'. This must be a valid operation for sales order type.\",\r\n \"nullable\": true\r\n },\r\n \"hasManualPrice\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that the `unitPrice` in this line has been specified manually.\\r\\nIf set to \\\"false\\\", the system updates the unit price in the line according to predefined rules.\\r\\nNote that the behavior of the field `unitPrice` is affected by this option.\\r\\nIf `hasManualPrice` is provided and set to \\\"false\\\", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules.\",\r\n \"nullable\": true\r\n },\r\n \"branchId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"The branch with which this line is associated.\\r\\nIf no `BranchId` is provided, default is set from order `BranchId`\",\r\n \"nullable\": true\r\n },\r\n \"commissionable\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if line is comissionable.\\r\\nIf not set, the default value is picked from the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"salesPersonId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the sales person for the line.\\r\\nIf `SalesPersonId` is provided as (null), the value will be set from from order `SalesPersonId`\",\r\n \"nullable\": true\r\n },\r\n \"purchaseOrderSource\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the purchase source of the line.\\r\\nAccepted values are `dropShip` or `purchaseToOrder`, when no value provided, the default value is picked from the inventory item.\\r\\nIf the value was provided as '' (empty string), the value will set to null.\",\r\n \"nullable\": true\r\n },\r\n \"supplierId\": {\r\n \"type\": \"string\",\r\n \"description\": \"\\r\\n If the actual value was provided as (null), the value will be set from the inventory item preferred supplier,\\r\\n can be set only if the Purchase Order Source is set to `dropShip` or `purchaseToOrder`\\r\\n \",\r\n \"nullable\": true\r\n },\r\n \"supplierPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the supplier price for the line item.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"projectTaskId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"The project task with which this sales order line is associated\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderPaymentSettings\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"paymentMethodId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the default payment method set on the customer. This must be a valid and active payment method id.\",\r\n \"nullable\": true\r\n },\r\n \"cashAccountId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"The cash account associated with the set payment method.\",\r\n \"nullable\": true\r\n },\r\n \"paymentReference\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the external reference number for the order. This must be set if order type requires it.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderShippingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"scheduledDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the date the shipment is scheduled for\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"shipSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether the order should be shipped separately or included in a batch segment\",\r\n \"nullable\": true\r\n },\r\n \"rule\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the shipping rule for the order\",\r\n \"nullable\": true\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderAddressDto\"\r\n },\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderContactDto\"\r\n },\r\n \"preferredWarehouseId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the default site for the customer supplied to use on the order. Must be a valid site id\",\r\n \"nullable\": true\r\n },\r\n \"intrastatTransactionTypeId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Sets the intrastat transaction type id for the sales order, if not supplied the default value from the ordertype will be used. Must be a valid intrastat transaction type id.\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"shipViaId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the unique id that represents the carrier and its service to be used for shipping the ordered goods.\",\r\n \"nullable\": true\r\n },\r\n \"residentialDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether this is residential delivery\",\r\n \"nullable\": true\r\n },\r\n \"saturdayDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether this is a saturday delivery\",\r\n \"nullable\": true\r\n },\r\n \"insurance\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether insurance applies to this shipping\",\r\n \"nullable\": true\r\n },\r\n \"priority\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Sets priority of the order\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"zoneId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the shipping zone of the order freight\",\r\n \"nullable\": true\r\n },\r\n \"fobPointId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the point (such as a city or town) where the title of goods passes from the company to the customer.\",\r\n \"nullable\": true\r\n },\r\n \"termsId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the shipping terms used for the order.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderAddressDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"line1\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 1\",\r\n \"nullable\": true\r\n },\r\n \"line2\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 2\",\r\n \"nullable\": true\r\n },\r\n \"line3\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 3\",\r\n \"nullable\": true\r\n },\r\n \"postalCode\": {\r\n \"maxLength\": 20,\r\n \"type\": \"string\",\r\n \"description\": \"The postal code\",\r\n \"nullable\": true\r\n },\r\n \"city\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"The city\",\r\n \"nullable\": true\r\n },\r\n \"stateId\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"The state\",\r\n \"nullable\": true\r\n },\r\n \"countryId\": {\r\n \"maxLength\": 2,\r\n \"type\": \"string\",\r\n \"description\": \"The country.\",\r\n \"nullable\": true\r\n },\r\n \"overridesDefault\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this address overrides the default address\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines an address when updating a sales order.\\r\\nOnly the provided fields will be changed in address.\"\r\n },\r\n \"PatchSalesOrderBillingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderAddressDto\"\r\n },\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderContactDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderCommand\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the order date of the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"customer\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderCustomerDto\"\r\n },\r\n \"currencyId\": {\r\n \"maxLength\": 5,\r\n \"type\": \"string\",\r\n \"description\": \"Override the CurrencyId for the order. Must be a valid currency Id.\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Description for the order\\r\\n
Note that text fields should not contain any personally identifiable or otherwise sensitive data\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the status code for the order. Must be \\\"Open\\\", \\\"Hold\\\" or \\\"BackOrder\\\".\",\r\n \"nullable\": true\r\n },\r\n \"print\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderPrintDto\"\r\n },\r\n \"cancelBy\": {\r\n \"type\": \"string\",\r\n \"description\": \"Cancel by date for the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"shipping\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderShippingDto\"\r\n },\r\n \"billing\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderBillingDto\"\r\n },\r\n \"ownerId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the owner (employee) for the order\",\r\n \"nullable\": true\r\n },\r\n \"salesPersonId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets default sales person for the order\",\r\n \"nullable\": true\r\n },\r\n \"requestOn\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the requested on date for the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"financialInformation\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderFinancialInfoDto\"\r\n },\r\n \"paymentSettings\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderPaymentSettingsDto\"\r\n },\r\n \"note\": {\r\n \"maxLength\": 2048,\r\n \"type\": \"string\",\r\n \"description\": \"Any note to apply to the order header.\",\r\n \"nullable\": true\r\n },\r\n \"taxZoneId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Override the TaxZoneId for the order\",\r\n \"nullable\": true\r\n },\r\n \"useReplacementCostForMarginAndProfit\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"When this option is set to `true`, the `costTotal` of the order will be calculated based on `replacementUnitCost`.\\r\\nIf option is set to `false`, the `costTotal` will be calculated based on `unitCost`\",\r\n \"nullable\": true\r\n },\r\n \"freight\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderFreightDto\"\r\n },\r\n \"branchId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"The branch with which this order is associated.\",\r\n \"nullable\": true\r\n },\r\n \"originalOrderType\": {\r\n \"maxLength\": 2,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the type code for the original sales order\",\r\n \"nullable\": true\r\n },\r\n \"originalOrderId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the unique identifier of the original order\",\r\n \"nullable\": true\r\n },\r\n \"projectId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"The project with which this sales order is associated\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Application.Commands.PatchSalesOrder.PatchSalesOrderCommand is a command for updating parts of a sales order\"\r\n },\r\n \"PatchSalesOrderContactDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"name\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the full name of the contact\",\r\n \"nullable\": true\r\n },\r\n \"attention\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets any attention for the contact\",\r\n \"nullable\": true\r\n },\r\n \"phone1\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the primary phone number of the contact\",\r\n \"nullable\": true\r\n },\r\n \"email\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the e-mail address of the contact\",\r\n \"format\": \"email\",\r\n \"nullable\": true\r\n },\r\n \"overridesDefault\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this contact overrides the default contact\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines an contact when updating a sales order.\\r\\nOnly the provided fields will be changed in contact.\"\r\n },\r\n \"PatchSalesOrderCustomerDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique id of the the customer\",\r\n \"nullable\": true\r\n },\r\n \"refNo\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"The customer ref number text. If null or not supplied the value will not be changed\",\r\n \"nullable\": true\r\n },\r\n \"order\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"The customer order text.\",\r\n \"nullable\": true\r\n },\r\n \"contactId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The contact id for the customer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"termsId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the terms to use for the sales order.\\r\\nMust be a valid terms identifier\",\r\n \"nullable\": true\r\n },\r\n \"locationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the location for the customer supplied to use on the order.\\r\\nMust be a valid active location for the customer/>\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderFinancialInfoDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"invoiceSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets if the order should be invoiced/billed separately\",\r\n \"nullable\": true\r\n },\r\n \"invoiceDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the invoice date of the invoice that will be generated for the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"postPeriod\": {\r\n \"maxLength\": 6,\r\n \"type\": \"string\",\r\n \"description\": \"The post period for the invoice. This can be used to override the financial period. Must be a valid existing financial period.\",\r\n \"nullable\": true\r\n },\r\n \"dueDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The due date for the invoice created for the order. Default due date is set according to the credit terms.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"cashDiscountDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date when the cash discount is available for the invoice created for the order. Default date is set based on the terms selected in the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"invoiceId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The reference number of the invoice generated for this order.\\r\\nThis can be used if the numbering sequence assigned to invoices is configured for manual numbering.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderFreightDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"cost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight cost calculated for the sales order, can be manually set if orders Ship via code allows it.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"premiumAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The additional freight charges for handling the order.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"taxCategoryId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"The tax category that applies to the freight amount.\\r\\nBy default, it is the tax category associated with the ship via code selected for the order.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderLineDto\": {\r\n \"required\": [\r\n \"lineId\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lineId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The line id of the line.\",\r\n \"format\": \"int32\"\r\n },\r\n \"reasonCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"Patch the reason code for the line. This must be one of the selectable reason codes\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"maxLength\": 256,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the description of the order line item. This will override the default description from the inventory item\\r\\n
Note that text fields should not contain any personally identifiable or otherwise sensitive data\",\r\n \"nullable\": true\r\n },\r\n \"shippingRule\": {\r\n \"type\": \"string\",\r\n \"description\": \"The way the line item should be shipped.\\r\\n
One of the following options can be set:
CancelRemainder: The ordered quantity should be delivered in one shipmentBackOrderAllowed: The ordered quantity can be delivered in multiple shipments.ShipComplete: The ordered quantity should be delivered in one shipment.\",\r\n \"nullable\": true\r\n },\r\n \"unitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the unit cost of the product on the line.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"undershipThreshold\": {\r\n \"maximum\": 100,\r\n \"minimum\": 0,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the undership threshold in percent. If not set, information from the inventory item is used\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"overshipThreshold\": {\r\n \"maximum\": 999,\r\n \"minimum\": 100,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the overship threshold in percent. If not set, information from the inventory item is used\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"externalLink\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the external link for the line\",\r\n \"nullable\": true\r\n },\r\n \"note\": {\r\n \"maxLength\": 2048,\r\n \"type\": \"string\",\r\n \"description\": \"Any note to apply to the order header.\",\r\n \"nullable\": true\r\n },\r\n \"salesAccountId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the Sales Account Id of the line. The value must be one of the selectable Accounts.\\r\\nIf not set, a value based on the rules is used\",\r\n \"nullable\": true\r\n },\r\n \"projectTaskId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"The project task with which this sales order line is associated\",\r\n \"nullable\": true\r\n },\r\n \"sortOrder\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"shipDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the day the order line should be shipped, so that the customer gets it on the requested date (Ship On).\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"requestDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the date the order line is requested (Requested On)\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"warehouseLocationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the warehouse location that will be used for the shipment generated for the order the warehouse location Id for this line.\\r\\nThis must be a valid location for `warehouseId` and will override the default if set.\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the warehouse the item should be shipped from. This will override the default, or the one set on the order head.\",\r\n \"nullable\": true\r\n },\r\n \"subaccount\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"string\"\r\n },\r\n \"description\": \"Overrides the Subaccount setup for the line.\\r\\nEach entry corresponds to a subaccount id/value pair\",\r\n \"nullable\": true\r\n },\r\n \"hasManualDiscount\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that line level discount is applied manually.\\r\\n\\r\\nNote that the behavior of the fields 'discountCode', 'discountPercent' and 'discountAmount' is affected by this option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and discount field(s) is provided, the system will set the line level discounts according to the predefined rules.\\r\\n\",\r\n \"nullable\": true\r\n },\r\n \"discountPercent\": {\r\n \"maximum\": 100,\r\n \"minimum\": -100,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the manual percentage discount for the line.\\r\\n\\r\\nNote that the behavior of the 'discountPercent' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountPercent' is provided, the system will set the discountPercent according to the predefined rules.\\r\\n\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the manual currency discount amount for the line.\\r\\n\\r\\nNote that the behavior of the 'discountAmount' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountAmount' is provided, the system will set the discountAmount according to the predefined rules.\\r\\n\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"taxCategoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the default tax category id. The value must be one of the selectable Tax Categories\",\r\n \"nullable\": true\r\n },\r\n \"discountCode\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the discount for the line if applicable. This must be one of the selectable discount codes.\\r\\n\\r\\nNote that the behavior of the 'discountCode' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountCode' is provided, the system will set the discountCode according to the predefined rules.\\r\\n\",\r\n \"nullable\": true\r\n },\r\n \"quantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the quantity of items on the order line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"unitOfMeasure\": {\r\n \"maxLength\": 6,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the Unit of measure for the line item. This will override the default UOM for the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"unitPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the unit price for the product on the line.\\r\\nIf no price is set(null or omitted) the price will be set according to predefined rules based on the inventoryId and the customer.\\r\\nNote that the behavior of the `unitPrice` field is affected by the `hasManualPrice` option.\\r\\nIf `hasManualPrice` is provided and set to \\\"false\\\", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"operation\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of operation the line represents to the order. Acceptable values are 'Issue' or 'Receipt'. This must be a valid operation for sales order type.\",\r\n \"nullable\": true\r\n },\r\n \"hasManualPrice\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that the `unitPrice` in this line has been specified manually.\\r\\nIf set to \\\"false\\\", the system updates the unit price in the line according to predefined rules.\\r\\nNote that the behavior of the field `unitPrice` is affected by this option.\\r\\nIf `hasManualPrice` is provided and set to \\\"false\\\", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules.\",\r\n \"nullable\": true\r\n },\r\n \"branchId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the branch with which this line is associated.\\r\\nIf `BranchId` is provided as (null), the value will be set from from order `BranchId`\",\r\n \"nullable\": true\r\n },\r\n \"commissionable\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if line is comissionable.\",\r\n \"nullable\": true\r\n },\r\n \"salesPersonId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the sales person for the line.\\r\\nIf `SalesPersonId` is provided as (null), the value will be set from from order `SalesPersonId`\",\r\n \"nullable\": true\r\n },\r\n \"purchaseOrderSource\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the purchase source of the line.\\r\\nAccepted values are `dropShip` or `purchaseToOrder`, when null provided, value will be set from default value from the inventory item.\\r\\nIf the value was provided as '' (empty string), the value will set to null.\",\r\n \"nullable\": true\r\n },\r\n \"supplierId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the Purchase Order Vendor for the line, can be set if the purchase order source is `purchaseToOrder` or `dropShip`.\",\r\n \"nullable\": true\r\n },\r\n \"supplierPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the supplier price for the line item.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The sales order line which is set to patch\"\r\n },\r\n \"PatchSalesOrderLinesCommand\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lines\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderLineDto\"\r\n },\r\n \"description\": \"The sales order lines that are set to patch\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Application.Commands.PatchSalesOrderLines.PatchSalesOrderLinesCommand is a command for updating the lines of a sales order\"\r\n },\r\n \"PatchSalesOrderPaymentSettingsDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"paymentMethodId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the default payment method set on the customer. This must be a valid and active payment method id.\",\r\n \"nullable\": true\r\n },\r\n \"cashAccountId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"The cash account associated with the set payment method.\",\r\n \"nullable\": true\r\n },\r\n \"paymentReference\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the external reference number for the order. This must be set if order type requires it.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderShippingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"shipSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether the order should be shipped separately or included in a batch segment\",\r\n \"nullable\": true\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderAddressDto\"\r\n },\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderContactDto\"\r\n },\r\n \"preferredWarehouseId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the default site for the customer supplied to use on the order. Must be a valid site id\\r\\nIf empty string, the default site for order will be removed\",\r\n \"nullable\": true\r\n },\r\n \"rule\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the shipping rule for the order\",\r\n \"nullable\": true\r\n },\r\n \"scheduledDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the date the shipment is scheduled for\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"intrastatTransactionTypeId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Sets the intrastat transaction type id for the sales order. Must be a valid intrastat transaction type id.\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"shipViaId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the unique id that represents the carrier and its service to be used for shipping the ordered goods. Must be a valid carrier id.\\r\\nIf empty string then the value will be set to null\",\r\n \"nullable\": true\r\n },\r\n \"residentialDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether this is residential delivery\",\r\n \"nullable\": true\r\n },\r\n \"saturdayDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether this is a saturday delivery\",\r\n \"nullable\": true\r\n },\r\n \"insurance\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether insurance applies to this shipping\",\r\n \"nullable\": true\r\n },\r\n \"priority\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Sets priority of the order\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"zoneId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the shipping zone of the order freight\",\r\n \"nullable\": true\r\n },\r\n \"fobPointId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the point (such as a city or town) where the title of goods passes from the company to the customer.\",\r\n \"nullable\": true\r\n },\r\n \"termsId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the shipping terms used for the order.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"ProblemDetails\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"title\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"detail\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"instance\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": {}\r\n },\r\n \"ProjectDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n },\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal unique identifier of the project\",\r\n \"format\": \"int32\"\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.ProjectDto class defines a project reference for a sales order\"\r\n },\r\n \"SalesOrderBillingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/ContactDto\"\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/AddressDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderCommissionDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"salesPersonId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id of the sales person that gets the commision\",\r\n \"nullable\": true\r\n },\r\n \"percent\": {\r\n \"type\": \"number\",\r\n \"description\": \"The commission percent\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"amount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The commission amount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"commissionableAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The order's commissionable amount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderCustomerDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal unique id of the customer\",\r\n \"format\": \"int32\"\r\n },\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique id of the the customer\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer name\",\r\n \"nullable\": true\r\n },\r\n \"taxZone\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"contactId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The contact id for the customer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"order\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer order text\",\r\n \"nullable\": true\r\n },\r\n \"refNo\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer ref number text\",\r\n \"nullable\": true\r\n },\r\n \"location\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderDiscountDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"manualOrderIndex\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The number of discount line set for the order\",\r\n \"format\": \"int32\"\r\n },\r\n \"skipDiscount\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the discount has been cancelled for the order and is not applicable\"\r\n },\r\n \"discountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the discount applied to the order\",\r\n \"nullable\": true\r\n },\r\n \"discountSequenceId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the discount sequence of the discount ID applied to the order\",\r\n \"nullable\": true\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of discount whose sequence was applied to the document(Group or Document)\",\r\n \"nullable\": true\r\n },\r\n \"isManual\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that the discount has been applied manually\"\r\n },\r\n \"discountableAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amount used as a base for discount calculation if the discount is based on amount.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountableQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity used as a base for discount calculation if the discount is based on quantity.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amount of the discount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountPercent\": {\r\n \"type\": \"number\",\r\n \"description\": \"The discount percent, if the discount is defined to be calculated as a percentage\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"freeItem\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"freeItemQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of the free item. Used to set the quantity for the order line generate by a free item discount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type code for the sales order\",\r\n \"nullable\": true\r\n },\r\n \"orderId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique identifier of the order\",\r\n \"nullable\": true\r\n },\r\n \"branch\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"Description of the order\",\r\n \"nullable\": true\r\n },\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"Date the order was submitted\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"cancelBy\": {\r\n \"type\": \"string\",\r\n \"description\": \"The cancel date for the order\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"lastModified\": {\r\n \"type\": \"string\",\r\n \"description\": \"Date the order was last modified\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"requestOn\": {\r\n \"type\": \"string\",\r\n \"description\": \"Date the order was requested\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"isRotRutDeductable\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether the order is ROT/RUT deductible\"\r\n },\r\n \"orderQty\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total quantity of inventory items in the order\",\r\n \"format\": \"double\"\r\n },\r\n \"note\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any notes on the order\",\r\n \"nullable\": true\r\n },\r\n \"currencyId\": {\r\n \"type\": \"string\",\r\n \"description\": \"CurrencyId for the order.\",\r\n \"nullable\": true\r\n },\r\n \"useReplacementCostForMarginAndProfit\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"When this option is set to `true`, the `costTotal` of the order will be calculated based on `replacementUnitCost`.\\r\\nIf option is set to `false`, the `costTotal` will be calculated based on `unitCost`\",\r\n \"nullable\": true\r\n },\r\n \"createdBy\": {\r\n \"type\": \"string\",\r\n \"description\": \"The user name of the creator of the order. If the order was created by an API call this field will be null or empty.\",\r\n \"nullable\": true\r\n },\r\n \"project\": {\r\n \"$ref\": \"#/components/schemas/ProjectDto\"\r\n },\r\n \"print\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderPrintDto\"\r\n },\r\n \"billing\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderBillingDto\"\r\n },\r\n \"paymentSettings\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderPaymentDto\"\r\n },\r\n \"financialInformation\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderFinancialInfoDto\"\r\n },\r\n \"owner\": {\r\n \"$ref\": \"#/components/schemas/EmployeeDto\"\r\n },\r\n \"origin\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderOriginDto\"\r\n },\r\n \"shipping\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderShippingDto\"\r\n },\r\n \"status\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderStatusDto\"\r\n },\r\n \"customer\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderCustomerDto\"\r\n },\r\n \"totals\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderTotalsDto\"\r\n },\r\n \"freight\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderFreightDto\"\r\n },\r\n \"originalOrderType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type code for the original sales order\",\r\n \"nullable\": true\r\n },\r\n \"originalOrderId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique identifier of the original order\",\r\n \"nullable\": true\r\n },\r\n \"salesPerson\": {\r\n \"$ref\": \"#/components/schemas/SalesPersonDto\"\r\n },\r\n \"version\": {\r\n \"type\": \"string\",\r\n \"description\": \"An internal order version used for detecting concurrent updates to an order\",\r\n \"format\": \"byte\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderExpansions\": {\r\n \"enum\": [\r\n \"None\",\r\n \"Billing\",\r\n \"Payment\",\r\n \"FinancialInformation\",\r\n \"Shipping\",\r\n \"Customer\",\r\n \"Owner\",\r\n \"Origin\",\r\n \"Note\",\r\n \"Freight\",\r\n \"All\"\r\n ],\r\n \"type\": \"string\",\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.SalesOrderExpansions enumeration defines individual parts of the Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDto that can be filled\"\r\n },\r\n \"SalesOrderFinancialInfoDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"invoiceSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether the order should be invoiced separately\"\r\n },\r\n \"invoiceId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id of the invoice issued for the order\",\r\n \"nullable\": true\r\n },\r\n \"invoiceDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The invoice date\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"dueDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The due date for the invoice\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"terms\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"cashDiscountDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date for the cash discount\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"postPeriod\": {\r\n \"type\": \"string\",\r\n \"description\": \"The post period for the invoice\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderFreightDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"volume\": {\r\n \"type\": \"number\",\r\n \"format\": \"double\"\r\n },\r\n \"weight\": {\r\n \"type\": \"number\",\r\n \"format\": \"double\"\r\n },\r\n \"cost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight cost calculated for the sales order,\",\r\n \"format\": \"double\"\r\n },\r\n \"costInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight cost calculated for the sales order in base currency.\",\r\n \"format\": \"double\"\r\n },\r\n \"premiumAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The additional freight charges for handling the order.\",\r\n \"format\": \"double\",\r\n \"readOnly\": true\r\n },\r\n \"premiumAmountInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The additional freight charges in base currency for handling the order.\",\r\n \"format\": \"double\",\r\n \"readOnly\": true\r\n },\r\n \"amount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amounts calculated based on the ship terms.\\r\\n///\",\r\n \"format\": \"double\"\r\n },\r\n \"amountInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amounts calculated based on the ship terms in base currency of the order.\",\r\n \"format\": \"double\"\r\n },\r\n \"taxCategoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The tax category that applies to the freight amount.\\r\\nBy default, it is the tax category associated with the ship via code selected for the order.\",\r\n \"nullable\": true,\r\n \"readOnly\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderLineDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lineId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The line number of the sales order line\",\r\n \"format\": \"int32\"\r\n },\r\n \"sortOrder\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Used to apply sort order to a set of lines\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"lineType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of sales order line\",\r\n \"nullable\": true\r\n },\r\n \"operation\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of operation the line represents to the order\",\r\n \"nullable\": true\r\n },\r\n \"orderDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date the order line was added\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"branch\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"inventory\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineInventoryDto\"\r\n },\r\n \"unitOfMeasure\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unit of measure (UOM) for the sales order line\",\r\n \"nullable\": true\r\n },\r\n \"quantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of unit of measure this line represents\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"baseOrderQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The base order quantity for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"unitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The unit cost of items on this order line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"unitPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"The unit price for items on this order line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any description for this order line\",\r\n \"nullable\": true\r\n },\r\n \"shippingRule\": {\r\n \"type\": \"string\",\r\n \"description\": \"The shipping rule code for this order line\",\r\n \"nullable\": true\r\n },\r\n \"completed\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this order line is completed or not\",\r\n \"nullable\": true\r\n },\r\n \"extendedPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"The extended price for this sales order line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"lineTotalBeforeDiscount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The line total before any discounts are applied\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The discount amount for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"externalLink\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any external link for this sales order line\",\r\n \"nullable\": true\r\n },\r\n \"taxCategoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The Tax Category Id applying to this order line\",\r\n \"nullable\": true\r\n },\r\n \"reasonCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"The reason code\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The Site Id for items on this line\",\r\n \"nullable\": true\r\n },\r\n \"undershipThreshold\": {\r\n \"type\": \"number\",\r\n \"description\": \"The undership threshold value (%)\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"overshipThreshold\": {\r\n \"type\": \"number\",\r\n \"description\": \"The overship threshold value (%)\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"shipDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The expected shipping date for this order line\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"requestDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The request date for this order line\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"note\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any note that has been applied to this order line\",\r\n \"nullable\": true\r\n },\r\n \"salesAccountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The general ledger account this line applies to\",\r\n \"nullable\": true\r\n },\r\n \"subaccount\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"string\"\r\n },\r\n \"description\": \"The general ledger subaccount this line applies to\",\r\n \"nullable\": true\r\n },\r\n \"openQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The open quantity for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"billedQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The billed quantity for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"quantityOnShipments\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity on shipments for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountPercent\": {\r\n \"type\": \"number\",\r\n \"description\": \"Discount percentage applied to this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"Code of discount applied to this line\",\r\n \"nullable\": true\r\n },\r\n \"hasManualDiscount\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Discount is applied manually\"\r\n },\r\n \"freeItem\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether these item(s) are free or not\"\r\n },\r\n \"warehouseLocation\": {\r\n \"$ref\": \"#/components/schemas/LocationDto\"\r\n },\r\n \"replacementUnitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The replacement unit cost of an item. This is set based on the supplier price.\\r\\nIf no supplier price found, the last price of the item's default supplier will be used.\\r\\nIf no default supplier is set, the last cost of the item will be used.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"hasManualPrice\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Unit price is applied manually\"\r\n },\r\n \"inventoryAlternateId\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"openLine\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if line has quantity left to be shipped\"\r\n },\r\n \"commissionable\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if line is comissionable\"\r\n },\r\n \"salesPerson\": {\r\n \"$ref\": \"#/components/schemas/SalesPersonDto\"\r\n },\r\n \"purchaseOrderSource\": {\r\n \"type\": \"string\",\r\n \"description\": \"Information about line purchase order source\",\r\n \"nullable\": true\r\n },\r\n \"supplier\": {\r\n \"$ref\": \"#/components/schemas/SupplierDto\"\r\n },\r\n \"supplierPrice\": {\r\n \"type\": \"number\",\r\n \"format\": \"double\"\r\n },\r\n \"projectTaskId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The project task with which this sales order line is associated\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderLineDtoPagedResult\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"value\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDto\"\r\n },\r\n \"description\": \"Gets or sets the items that are paged\",\r\n \"nullable\": true\r\n },\r\n \"nextPage\": {\r\n \"type\": \"string\",\r\n \"description\": \"Gets or sets the link to the next page with more results. If set to null then no more records are present.\",\r\n \"nullable\": true\r\n },\r\n \"totalCount\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderLineInventoryDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n },\r\n \"baseUnit\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderListDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"_links\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"$ref\": \"#/components/schemas/DtoLink\"\r\n },\r\n \"description\": \"Links applicable for the dto\",\r\n \"nullable\": true\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of the order\",\r\n \"nullable\": true\r\n },\r\n \"orderId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The order id (a.k.a OrderCd) for the order\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"string\",\r\n \"description\": \"The current status of the order\",\r\n \"nullable\": true\r\n },\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"The order date\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"shippingScheduledDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date shipment is scheduled\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"customerId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer Id for the order (a.k.a CustoemrCd)\",\r\n \"nullable\": true\r\n },\r\n \"customerName\": {\r\n \"type\": \"string\",\r\n \"description\": \"The name of the customer as it appears on the order\",\r\n \"nullable\": true\r\n },\r\n \"orderQty\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total number of items on the order\",\r\n \"format\": \"double\"\r\n },\r\n \"orderTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total amount on the order\",\r\n \"format\": \"double\"\r\n },\r\n \"currency\": {\r\n \"type\": \"string\",\r\n \"description\": \"The currency id for the order\",\r\n \"nullable\": true\r\n },\r\n \"location\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer location for this order\",\r\n \"nullable\": true\r\n },\r\n \"requestOn\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date the order is requested\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"customerOrder\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer order link\",\r\n \"nullable\": true\r\n },\r\n \"customerRefNo\": {\r\n \"type\": \"string\",\r\n \"description\": \"The order reference number of the customer\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any description on the order\",\r\n \"nullable\": true\r\n },\r\n \"lastModified\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date and time the order was last modified\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderListDtoPagedResult\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"value\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDto\"\r\n },\r\n \"description\": \"Gets or sets the items that are paged\",\r\n \"nullable\": true\r\n },\r\n \"nextPage\": {\r\n \"type\": \"string\",\r\n \"description\": \"Gets or sets the link to the next page with more results. If set to null then no more records are present.\",\r\n \"nullable\": true\r\n },\r\n \"totalCount\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderOriginDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"_links\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"$ref\": \"#/components/schemas/DtoLink\"\r\n },\r\n \"description\": \"Links applicable for the dto\",\r\n \"nullable\": true\r\n },\r\n \"orderType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The order type code for the origin order\",\r\n \"nullable\": true\r\n },\r\n \"orderId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique id of the origin order\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderPaymentDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"paymentMethod\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"cashAccountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The cash account to use\",\r\n \"nullable\": true\r\n },\r\n \"paymentReference\": {\r\n \"type\": \"string\",\r\n \"description\": \"The payment reference\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderPrintDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"descriptionOnInvoice\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Set to true to print description on the invoice\",\r\n \"nullable\": true\r\n },\r\n \"noteOnInternalDocuments\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Set to true to print note on internal documents\",\r\n \"nullable\": true\r\n },\r\n \"noteOnExternalDocuments\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Set to true to print note on external documents\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderRotRutDistributionDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lineId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Reference to the order line\",\r\n \"format\": \"int32\"\r\n },\r\n \"personalId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The personal id\",\r\n \"nullable\": true\r\n },\r\n \"amount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"extra\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this is extra or not\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderRotRutDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"distributedAutomatically\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether the ROT/RUT is distributed automatically\"\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of ROT/RUT\",\r\n \"nullable\": true\r\n },\r\n \"appartment\": {\r\n \"type\": \"string\",\r\n \"description\": \"The appartment reference\",\r\n \"nullable\": true\r\n },\r\n \"estate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The estate reference\",\r\n \"nullable\": true\r\n },\r\n \"organizationNumber\": {\r\n \"type\": \"string\",\r\n \"description\": \"The organization number\",\r\n \"nullable\": true\r\n },\r\n \"distribution\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderRotRutDistributionDto\"\r\n },\r\n \"description\": \"The distrinbution entries\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderShipmentDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of the shipment\",\r\n \"nullable\": true\r\n },\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id of a shipments created for the order\",\r\n \"nullable\": true\r\n },\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date of the shipment\",\r\n \"format\": \"date-time\"\r\n },\r\n \"quantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of goods on the shipment\",\r\n \"format\": \"double\"\r\n },\r\n \"weight\": {\r\n \"type\": \"number\",\r\n \"description\": \"The weight of the shipped goods\",\r\n \"format\": \"double\"\r\n },\r\n \"volume\": {\r\n \"type\": \"number\",\r\n \"description\": \"The volume of the shipped goods\",\r\n \"format\": \"double\"\r\n },\r\n \"invoiceType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of invoice\",\r\n \"nullable\": true\r\n },\r\n \"invoiceId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id of the invoice\",\r\n \"nullable\": true\r\n },\r\n \"inventoryDocumentType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of inventory document created for the shipment\",\r\n \"nullable\": true\r\n },\r\n \"inventoryReferenceId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id of the inventory document created for the shipment\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderShipmentDto specifies a shipment line detail for a sales order\"\r\n },\r\n \"SalesOrderShippingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/ContactDto\"\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/AddressDto\"\r\n },\r\n \"scheduledDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The shipping scheduled date\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"shipSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this order can/is shipped separately\"\r\n },\r\n \"rule\": {\r\n \"type\": \"string\",\r\n \"description\": \"The shipping rule\",\r\n \"nullable\": true\r\n },\r\n \"preferredWarehouse\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"shipVia\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"fobPoint\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"terms\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"zone\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"residentialDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this is residential delivery\"\r\n },\r\n \"saturdayDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this is a saturday delivery\"\r\n },\r\n \"insurance\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether insurance applies to this shipping\"\r\n },\r\n \"intrastatTransactionType\": {\r\n \"$ref\": \"#/components/schemas/IdDescriptionPairDto\"\r\n },\r\n \"priority\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Priority of the order\",\r\n \"format\": \"int32\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderStatusDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The status code for the order\",\r\n \"nullable\": true\r\n },\r\n \"cancelled\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this order is in a cancelled state\"\r\n },\r\n \"hold\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this order is in a held state\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderTaxDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"taxId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique tax identifier of the specific tax applied to the document\",\r\n \"nullable\": true\r\n },\r\n \"taxRate\": {\r\n \"type\": \"number\",\r\n \"description\": \"The tax rate used for the tax\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"taxableAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The calculated taxable amount for the specific tax\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"taxAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The calculated tax amount for the specific tax\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"exemptTax\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the taxable amount will be included in taxExemptTotal\"\r\n },\r\n \"includeInTaxable\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the taxable amount will be included in taxableTotal\"\r\n },\r\n \"isPendingTax\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the tax calculated is treated as a pending tax\"\r\n },\r\n \"isStatisticalTax\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the tax calculated is treated as a statistical tax\"\r\n },\r\n \"isReverseTax\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the tax is treated as a reverse tax\"\r\n },\r\n \"taxType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of tax, which can be Sales, Use, VAT or Withholding\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderTaxDto specifies a tax line detail for a sales order\"\r\n },\r\n \"SalesOrderTotalsDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"orderTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The order total\",\r\n \"format\": \"double\"\r\n },\r\n \"orderTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The order total in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"taxableTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The VAT taxable total\",\r\n \"format\": \"double\"\r\n },\r\n \"taxableTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The VAT taxable in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"taxExemptTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The VAT exempt total\",\r\n \"format\": \"double\"\r\n },\r\n \"taxExemptTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The VAT exempt total in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"taxTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The tax total\",\r\n \"format\": \"double\"\r\n },\r\n \"taxTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The tax total in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"discountTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The discount total\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The discount total in base currency\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"costTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total of the costs on the lines of the sales order. How the `costTotal` is calculated is dependent on the option `useReplacementCostForMarginAndProfit`.\\r\\nIf this option is `true` the `costTotal` will be calculated based on the `replacementUnitCost`.\\r\\nIf this option is `false`, the `costTotal` will be calculate based on `unitCost`\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"costTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total of the costs on the lines of the sales order in base currency.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"freightCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight cost calculated for the sales order. Not applicable for transfer order types.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"freightCostInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight cost calculated for the sales order in base currency. Not applicable for transfer order types.\",\r\n \"format\": \"double\",\r\n \"nullable\": true,\r\n \"readOnly\": true\r\n },\r\n \"freightTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight amount calculated in accordance with the shipping terms. Not applicable for transfer order types.\",\r\n \"format\": \"double\"\r\n },\r\n \"freightTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight amount calculated in accordance with the shipping terms in base currency. Not applicable for transfer order types.\",\r\n \"format\": \"double\"\r\n },\r\n \"unbilledAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The sum of unbilled amounts for the lines\",\r\n \"format\": \"double\"\r\n },\r\n \"unbilledAmountInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The sum of unbilled amounts for the lines in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"unshippedAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The sum of unshipped amounts for the lines\",\r\n \"format\": \"double\"\r\n },\r\n \"unshippedAmountInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The sum of unshipped amounts for the lines in base currency\",\r\n \"format\": \"double\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderValidationProblemDetails\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"title\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"detail\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"instance\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"errors\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"nullable\": true,\r\n \"readOnly\": true\r\n },\r\n \"details\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/ValidationErrorCodeDetails\"\r\n },\r\n \"description\": \"List with details for all the validation problems\",\r\n \"nullable\": true,\r\n \"readOnly\": true\r\n }\r\n },\r\n \"additionalProperties\": {},\r\n \"description\": \"Defines an error response for validation problems\"\r\n },\r\n \"SalesPersonDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SupplierDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"ValidationErrorCodeDetails\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"code\": {\r\n \"type\": \"string\",\r\n \"description\": \"Error code\",\r\n \"nullable\": true,\r\n \"example\": \"0001-NullNotAllowed\"\r\n },\r\n \"message\": {\r\n \"type\": \"string\",\r\n \"description\": \"Detailed validation message\",\r\n \"nullable\": true,\r\n \"example\": \"Null value not allowed\"\r\n },\r\n \"parameters\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {},\r\n \"description\": \"Extra parameters related to the validation problem.\\r\\nIf the validation problem refers to a particular field the \\\"property\\\" element will contain the field name\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines details related to validation problems\"\r\n },\r\n \"WarehouseAvailabilityDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalWarehouseId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The internal id used by the system for the warehouse\",\r\n \"format\": \"int32\"\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id (SiteCd) of the warehouse\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description of the warehouse\",\r\n \"nullable\": true\r\n },\r\n \"quantityOnHand\": {\r\n \"type\": \"number\",\r\n \"description\": \"Physical quantity on-hand of items in the specific warehouse\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityAvailable\": {\r\n \"type\": \"number\",\r\n \"description\": \"You can configure the way this estimated quantity is calculated by using availability\\r\\ncalculation rules. The available quantity may include anticipated transactions and therefore\\r\\nmay be less than or greater than the QuantityOnHand. Anticipated transactions correspond\\r\\nto the documents and transactions that have been entered in the system but not yet\\r\\nprocessed to the end.\\r\\nIn the availability calculation settings of an item class, you specify which anticipated\\r\\ntransactions affect the available quantity. Thus, the available quantity may include\\r\\ngoods on purchase orders and exclude the goods allocated for sales orders. You can use\\r\\nthe available quantity as an indicator of demand\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityAvailableForShipment\": {\r\n \"type\": \"number\",\r\n \"description\": \"Estimated quantity calculated by using the following formula: the QuantityOnHand minus the quantity on unreleased inventory\\r\\nissues, minus the quantity allocated for shipping. Thus, the QuantityAvailableForShipment can be less than the QuantityOnHand\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityNotAvailable\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity stored at locations not included in the availability calculation.\\r\\nFor each warehouse location, the 'Include in Qty. Available' check box on the\\r\\nWarehouses(IN204000) screen defines whether the quantity of items stored at this\\r\\nlocation is included in the quantity of available items.\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityPurchaseOrders\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of the inventory item included in open purchase orders.\",\r\n \"format\": \"double\"\r\n },\r\n \"estimatedUnitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The estimated cost per unit, calculated as EstimatedTotalCost/QuantityOnHand\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"estimatedTotalCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total cost for the QuantityOnHand\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"lastModified\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date and time the entry for this warehouse was modified\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"locations\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/LocationAvailabilityDto\"\r\n },\r\n \"description\": \"List of locations in the warehouse for the specific inventory item.\\r\\nNote that this is not returned as part of the response unless expand=Location is specified with the request.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Warehouse information for a specific inventory item\"\r\n }\r\n },\r\n \"securitySchemes\": {\r\n \"oauth2\": {\r\n \"type\": \"oauth2\",\r\n \"description\": \"\",\r\n \"flows\": {\r\n \"clientCredentials\": {\r\n \"tokenUrl\": \"https://connect.visma.com/connect/token\",\r\n \"scopes\": {\r\n \"visma.net.erp.salesorder:read\": \"Read sales order data\",\r\n \"visma.net.erp.salesorder:write\": \"Create or update sales order data\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"x-visma-erp-error-codes\": [\r\n {\r\n \"code\": \"0001-NullNotAllowed\",\r\n \"description\": \"Null value not allowed\"\r\n },\r\n {\r\n \"code\": \"0001-EmptyNotAllowed\",\r\n \"description\": \"Empty value not allowed\"\r\n },\r\n {\r\n \"code\": \"0002-InvalidLength\",\r\n \"description\": \"Invalid length\"\r\n },\r\n {\r\n \"code\": \"0003-InvalidValue\",\r\n \"description\": \"Invalid value\"\r\n },\r\n {\r\n \"code\": \"0004-ValueNotAllowed\",\r\n \"description\": \"Value not allowed\"\r\n },\r\n {\r\n \"code\": \"0100-OutsideValidRange\",\r\n \"description\": \"Value is outside the valid range\"\r\n },\r\n {\r\n \"code\": \"0200-LineIdDoesNotExist\",\r\n \"description\": \" Line Id {0}. Line with provided Id does not exists in the order\"\r\n },\r\n {\r\n \"code\": \"1100-InvalidDiscount\",\r\n \"description\": \"Document/Group discount cannot exceed the line total\"\r\n },\r\n {\r\n \"code\": \"1101-DiscountAmountMoreThanExtPrice\",\r\n \"description\": \"Discount amount can not be greater than Extended Price\"\r\n },\r\n {\r\n \"code\": \"1102-DiscountSetupInvalid\",\r\n \"description\": \"Discount setup is not valid for discounts calculations\"\r\n },\r\n {\r\n \"code\": \"1103-DiscountNotApplicable\",\r\n \"description\": \"Discount can not be applied to line\"\r\n },\r\n {\r\n \"code\": \"1104-FreeItemNotFound\",\r\n \"description\": \"Free item specified in header discount was not found.\"\r\n },\r\n {\r\n \"code\": \"1105-InvalidDiscountCode\",\r\n \"description\": \"Invalid DiscountCode. The Discount is missing or invalid\"\r\n },\r\n {\r\n \"code\": \"1200-SubaccountSegmentInactive\",\r\n \"description\": \"Subaccount segment values inactive\"\r\n },\r\n {\r\n \"code\": \"1201-SubaccountInactive\",\r\n \"description\": \"Subaccount is not Active\"\r\n },\r\n {\r\n \"code\": \"1202-SegmentValueNotFound\",\r\n \"description\": \"Segment value for Subaccount cannot be found\"\r\n },\r\n {\r\n \"code\": \"1203-SubaccountNotFound\",\r\n \"description\": \"Could not find Subaccount segment value\"\r\n },\r\n {\r\n \"code\": \"1204-SubaccountError\",\r\n \"description\": \"Validation errors for the subaccount\"\r\n },\r\n {\r\n \"code\": \"1300-InvalidShipComplete\",\r\n \"description\": \"If require location and not require shipping then ship complete cannot be set to back order allowed\"\r\n },\r\n {\r\n \"code\": \"1310-FreightCostCanNotBeSetManually\",\r\n \"description\": \"Freight cost is not allowed to be set manually according to the Ship Via Code settings\"\r\n },\r\n {\r\n \"code\": \"1400-CustomerLookupException\",\r\n \"description\": \"Exception searching customer\"\r\n },\r\n {\r\n \"code\": \"1401-MissingTermsId\",\r\n \"description\": \"TermsId cannot be empty in the order. Set a default terms on the customer or specify the terms for the order\"\r\n },\r\n {\r\n \"code\": \"1402-PaymentMethodIdNotFound\",\r\n \"description\": \"Payment method set for order can not be found\"\r\n },\r\n {\r\n \"code\": \"1403-InactivePaymentMethodId\",\r\n \"description\": \"Payment methods set for order is inactive\"\r\n },\r\n {\r\n \"code\": \"1404-InvalidPaymentMethodId\",\r\n \"description\": \"Payment method set for order can not be used in sales orders\"\r\n },\r\n {\r\n \"code\": \"1405-PaymentReferenceRequired\",\r\n \"description\": \"Payment reference not set, order type requires it\"\r\n },\r\n {\r\n \"code\": \"1406-PaymentReferenceProhibited\",\r\n \"description\": \"Order type does not allow payment reference\"\r\n },\r\n {\r\n \"code\": \"1407-InvalidCustomerStatus\",\r\n \"description\": \"Invalid Customer Status\"\r\n },\r\n {\r\n \"code\": \"1408-OverrideCurrencyIdProhibited\",\r\n \"description\": \"Currency Id can not be overridden\"\r\n },\r\n {\r\n \"code\": \"1409-PaymentMethodRequired\",\r\n \"description\": \"Payment method not set, order type requires it\"\r\n },\r\n {\r\n \"code\": \"1500-CashAccountRequired\",\r\n \"description\": \"Cash account not set, order type requires it\"\r\n },\r\n {\r\n \"code\": \"1501-CashAccountInactive\",\r\n \"description\": \"Cash account set for order is inactive\"\r\n },\r\n {\r\n \"code\": \"1502-CashAccountNotFound\",\r\n \"description\": \"Cash account set on order can not be found\"\r\n },\r\n {\r\n \"code\": \"1503-CashAccountInvalidForPaymentMethod\",\r\n \"description\": \"Cash account cannot be used with the set Payment Method\"\r\n },\r\n {\r\n \"code\": \"1504-CashAccountInvalidForBranch\",\r\n \"description\": \"Cash account not allowed to be used with the set Branch\"\r\n },\r\n {\r\n \"code\": \"1600-FinancialPeriodNotFound\",\r\n \"description\": \"No financial period that matches the selected Invoice date can be found. Please change the Invoice Date, set the Financial period for the order or create Financial periods\"\r\n },\r\n {\r\n \"code\": \"1601-FinancialPeriodClosed\",\r\n \"description\": \"Financial period '{0}' is closed and cannot be set for order\"\r\n },\r\n {\r\n \"code\": \"1602-FinancialPeriodInactive\",\r\n \"description\": \"Financial period is inactive. Activate it or set another period\"\r\n },\r\n {\r\n \"code\": \"1603-FinancialPeriodNotApplicable\",\r\n \"description\": \"Post period cannot be set for this order type\"\r\n },\r\n {\r\n \"code\": \"1700-WarehouseLocationNotFound\",\r\n \"description\": \"Warehouse location is not found\"\r\n },\r\n {\r\n \"code\": \"1701-WarehouseLocationInactive\",\r\n \"description\": \"Warehouse location is inactive\"\r\n },\r\n {\r\n \"code\": \"1703-WarehouseLocationInvalid\",\r\n \"description\": \"Sales not allowed for warehouse location set for line\"\r\n },\r\n {\r\n \"code\": \"1704-InvalidOrderType\",\r\n \"description\": \"Not possible to update warehouse for line with line number {0}. Setting warehouse location is allowed only for not shippable orders.\"\r\n },\r\n {\r\n \"code\": \"1705-DuplicatedSiteCds\",\r\n \"description\": \"Duplicated site cds\"\r\n },\r\n {\r\n \"code\": \"1800-InvalidLineOperation\",\r\n \"description\": \"Given line operation is not accepted for this order type\"\r\n },\r\n {\r\n \"code\": \"1801-MissingReasonCode\",\r\n \"description\": \"Reason code is not set and order type requires it\"\r\n },\r\n {\r\n \"code\": \"1802-InvalidWarehouseId\",\r\n \"description\": \"Invalid Warehouse Id, or Warehouse Id not found\"\r\n },\r\n {\r\n \"code\": \"1803-UniqueInventoryIdNotFound\",\r\n \"description\": \"Cannot find unique InventoryId for inventoryId: '{0}'\"\r\n },\r\n {\r\n \"code\": \"1804-InventoryIdNotFound\",\r\n \"description\": \"InventoryId cannot be found or is invalid\"\r\n },\r\n {\r\n \"code\": \"1805-InvalidTaxCategoryId\",\r\n \"description\": \"Invalid TaxCategoryId, or TaxCategory not found\"\r\n },\r\n {\r\n \"code\": \"1806-InvalidSalesAccountId\",\r\n \"description\": \"Invalid SalesAccountId specified\"\r\n },\r\n {\r\n \"code\": \"1807-InvalidReasonCode\",\r\n \"description\": \"Invalid ReasonCode, or ReasonCode not found\"\r\n },\r\n {\r\n \"code\": \"1808-InvalidUnitOfMeasure\",\r\n \"description\": \"Invalid Unit of Measure\"\r\n },\r\n {\r\n \"code\": \"1809-InvalidQuantityForType\",\r\n \"description\": \"Quantity must be zero or positive when inventory item is not of type MiscCharge\"\r\n },\r\n {\r\n \"code\": \"1810-LineAlreadyCompleted\",\r\n \"description\": \"Line is marked as completed. Patch operation can not be done on completed lines.\"\r\n },\r\n {\r\n \"code\": \"1811-LineAlreadyShippedExternalLink\",\r\n \"description\": \"Not possible to update External Link. Update only accepted for orders, where the updated line has not been shipped\"\r\n },\r\n {\r\n \"code\": \"1812-LineAlreadyShippedSalesAccountId\",\r\n \"description\": \"Not possible to update sales account id. Update only accepted for orders, where the updated line has not been shipped\"\r\n },\r\n {\r\n \"code\": \"1813-InputLinesExceedExistingLinesCount\",\r\n \"description\": \"The number of provided lines exceed existing sales order lines\"\r\n },\r\n {\r\n \"code\": \"1814-ReasonCodePrerequisitesNotMet\",\r\n \"description\": \"The reason code prerequisites for the line does not meet expectations\"\r\n },\r\n {\r\n \"code\": \"1815-SortOrderExceedLinesCount\",\r\n \"description\": \"Cannot set higher sort order number than the number of lines\"\r\n },\r\n {\r\n \"code\": \"1816-SortOrderNbrIsNotUnique\",\r\n \"description\": \"The SortOrder number provided is not unique in your request\"\r\n },\r\n {\r\n \"code\": \"1817-LineIdIsNotUnique\",\r\n \"description\": \"The LineId provided is not unique in your request\"\r\n },\r\n {\r\n \"code\": \"1818-LineAlreadyShippedUnitCost\",\r\n \"description\": \"Not possible to update Unit cost. Update only accepted for orders, where the updated line has not been shipped\"\r\n },\r\n {\r\n \"code\": \"1819-LineAlreadyShippedShippingRule\",\r\n \"description\": \"Not possible to update Shipping rule. Update only accepted for orders, where the updated line has not been shipped\"\r\n },\r\n {\r\n \"code\": \"1820-LineIsFreeItem\",\r\n \"description\": \"Cannot change discount fields for line that is marked as free item line\"\r\n },\r\n {\r\n \"code\": \"1821-InventoryIdFreeItemNotFound\",\r\n \"description\": \"InventoryId for a free Item cannot be found or is invalid\"\r\n },\r\n {\r\n \"code\": \"1822-CanNotUpdateLineLocation\",\r\n \"description\": \"Not possible to update warehouse for line with line number {0}. Update only accepted for orders in statuses Open, On hold, Back ordered, Credit hold and where the updated line has not been shipped and line is not completed.\"\r\n },\r\n {\r\n \"code\": \"1823-DeleteLineWhichIsAlreadyShipped\",\r\n \"description\": \"Cannot delete line that has been shipped\"\r\n },\r\n {\r\n \"code\": \"1824-DeleteLineWhichIsFreeDiscountLine\",\r\n \"description\": \"Cannot delete free item line set from a discount. Please review the discount\"\r\n },\r\n {\r\n \"code\": \"1825-DeleteSalesOrderWithShippedLines\",\r\n \"description\": \"Cannot delete order containing lines that have been shipped\"\r\n },\r\n {\r\n \"code\": \"1900-OrderNumberSequenceNotFound\",\r\n \"description\": \"Order number sequence cannot be found\"\r\n },\r\n {\r\n \"code\": \"1901-InactiveSalesPerson\",\r\n \"description\": \"Sales Person is not active\"\r\n },\r\n {\r\n \"code\": \"1902-SalesPersonNotFound\",\r\n \"description\": \"Sales Person is not found\"\r\n },\r\n {\r\n \"code\": \"1903-SupplierNotFound\",\r\n \"description\": \"Supplier not found or is not active\"\r\n },\r\n {\r\n \"code\": \"1904-ProjectNotFound\",\r\n \"description\": \"Project cannot be found\"\r\n },\r\n {\r\n \"code\": \"1905-ProjectNotVisibleInSO\",\r\n \"description\": \"Project is not accepted for use in a sales order\"\r\n },\r\n {\r\n \"code\": \"1906-ProjectCancelled\",\r\n \"description\": \"Project cannot be set because status is Cancelled\"\r\n },\r\n {\r\n \"code\": \"1907-ProjectCompleted\",\r\n \"description\": \"Project cannot be set because status is Completed\"\r\n },\r\n {\r\n \"code\": \"1908-ProjectTaskNotFound\",\r\n \"description\": \"Project task cannot be found\"\r\n },\r\n {\r\n \"code\": \"5000-InvalidAttributeFilter\",\r\n \"description\": \"Invalid attributeFilter\"\r\n },\r\n {\r\n \"code\": \"5001-InvalidAttributeName\",\r\n \"description\": \"The attribute name is invalid. Only characters, digits, or space is allowed\"\r\n },\r\n {\r\n \"code\": \"5002-BaseUnitDetailsNotSet\",\r\n \"description\": \"Base Unit details not set for unit\"\r\n }\r\n ]\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": []\r\n }\r\n ]\r\n}", + "json": "{\r\n \"openapi\": \"3.0.1\",\r\n \"info\": {\r\n \"title\": \"Visma.net.ERP.SalesOrders.Api\",\r\n \"version\": \"1.1.0.1279\"\r\n },\r\n \"servers\": [\r\n {\r\n \"url\": \"/\"\r\n }\r\n ],\r\n \"paths\": {\r\n \"/api/v3/Customers\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"Customers\"\r\n ],\r\n \"summary\": \"Gets a list of customers\",\r\n \"description\": \"Sample request:\\r\\n \\r\\nGET /customers?filter=visma&pageSize=10\",\r\n \"operationId\": \"Customers_GetList_\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"filter\",\r\n \"in\": \"query\",\r\n \"description\": \"An optional text string to find customers matching (searching fields id, name, gln, tax registration id). If not specified all customers are returned.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of customers retrieved per page. If not specified, the default value of 100 will be used.\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 100\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"The zero based page index to retrieve\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 0\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Returns the list of customers found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/CustomerDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/CustomerDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/CustomerDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If pageSize or pageIndex is not within the allowed range\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/Customers/{customerId}/locations\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"Customers\"\r\n ],\r\n \"summary\": \"Gets a list of locations for the specified customer\",\r\n \"description\": \"Sample request:\\r\\n \\r\\nGET /customers/10000/locations\",\r\n \"operationId\": \"Customers_GetCustomerLocationList_customerIdlocations\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"customerId\",\r\n \"in\": \"path\",\r\n \"description\": \"The customer id (CustomerCd) to retrieve locations for\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"List of locations for the specified customer\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationItemDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationItemDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationItemDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If customer with id customerId is not found or is not accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/Inventory\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"Inventory\"\r\n ],\r\n \"summary\": \"Gets an inventory summary for inventory items.\",\r\n \"description\": \"Sample request:\\r\\n \\r\\nGET /inventory?inventoryId=Item1\\r\\n \\r\\nGET /inventory?warehouseId=MAIN&modifiedSince=2021-08-01T12:00:00&modifiedSinceCondition=>&pageSize=1000\\r\\n \\r\\nIf modifiedSinceCondition is not specified, it defaults to >=.\\r\\nIf modifiedSince is not specified, it defaults to 1900-01-01.\\r\\n\\r\\nIf expand with lotSerial, only the lotSerial numbers that has quantity will be included in the response.\\r\\n \\r\\nGET /inventory?inventoryId=Item1&InventoryId=Item2&expand=location,attribute,lotSerial\\r\\n \\r\\nGET /inventory?expand=location&attributeFilter=WEBSHOP:1\",\r\n \"operationId\": \"Inventory_GetList_\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"inventoryId\",\r\n \"in\": \"query\",\r\n \"description\": \"A list of zero or more inventory items to get a summary for. If no inventoryId is passed, all inventory items will be included in the response.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"warehouseId\",\r\n \"in\": \"query\",\r\n \"description\": \"A list of zero or more warehouses to get a summary for. If no warehouse is supplied, all warehouses will be included in the response.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"locationId\",\r\n \"in\": \"query\",\r\n \"description\": \"A list of zero or more locations to get a summary for. If no location is supplied, all locations will be included in the response.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"expand\",\r\n \"in\": \"query\",\r\n \"description\": \"An additional option to include location detail information with the warehouse summary, attribute details for the inventory item or lot/serial details. If this is not supplied, location information or attributes will not be included in the response.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/InventoryAvailabilityExpansions\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"modifiedSinceCondition\",\r\n \"in\": \"query\",\r\n \"description\": \"Condition used in filtering when an inventory item's warehouse or location availability last changed\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"modifiedSince\",\r\n \"in\": \"query\",\r\n \"description\": \"A date/time value for filtering when an inventory item's warehouse or location availability last changed\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n {\r\n \"name\": \"attributeFilter\",\r\n \"in\": \"query\",\r\n \"description\": \"One or more attribute filter values specified as attribute-id:attribute-value. For example \\\"attributeFilter=WEBSHOP:1&attributeFilter=AnotherAttribute:someValue\\\"\\r\\nIf two attributeFilter values have the same attribute-Id either one need to match.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of inventory items retrieved per page. If not specified the default pagesize is 10000 items per page\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"Gets or sets the zero based page index to get\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Returns list of inventory items found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/InventoryItemAvailabilityDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/InventoryItemAvailabilityDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/InventoryItemAvailabilityDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If modifiedSince is an invalid date, if expand contains an invalid value, or if any of the supplied attributeFilter(s) are invalid\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets information about a single sales order\",\r\n \"description\": \"The expand query parameter corresponds to sections in the Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDto.\\r\\nIf an expand value is not specified it will not be filled and returned in the response object.\\r\\n \\r\\nSample request:\\r\\n \\r\\n`GET /salesorders/SO/000100?expand=customer,payment`\",\r\n \"operationId\": \"SalesOrders_GetItemAsync_typeorderId\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"expand\",\r\n \"in\": \"query\",\r\n \"description\": \"An optional specification of what details to include about the sales order. The default value if not supplied is \\\"None\\\"\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderExpansions\"\r\n }\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDto\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDto\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDto\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"patch\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Make modifications to an existing sales order\",\r\n \"description\": \"If-Match header represents a version of Sales Order to be modified and must be included in request.\\r\\nValue of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header.\",\r\n \"operationId\": \"SalesOrders_Patch_typeorderId\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of the order to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The order number to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"requestBody\": {\r\n \"description\": \"Data to change about the sales order\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderCommand\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderCommand\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderCommand\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The order was modified successfully\"\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in command is outside the allowed range\\r\\n See #/components/x-visma-erp-error-codes for the full list of error codes.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"The order specified was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"412\": {\r\n \"description\": \"Order version does not match with If-Match header\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"428\": {\r\n \"description\": \"If-Match header was not supplied\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"409\": {\r\n \"description\": \"Conflict\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"delete\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Delete an existing sales order\",\r\n \"description\": \"If-Match header represents a version of Sales Order to be modified and must be included in request.\\r\\nValue of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header.\",\r\n \"operationId\": \"SalesOrders_Delete_typeorderId\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of the order to delete\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The order number to delete\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The order was deleted successfully\"\r\n },\r\n \"400\": {\r\n \"description\": \"Bad Request\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Specified order was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets a paged list with sales orders of a specific type\",\r\n \"description\": \"Sample requests:\\r\\n \\r\\n`GET /salesorders/SO`\\r\\n \\r\\n`GET /salesorders/SO?customerId=10000&status=Open&pageSize=10`\\r\\n \\r\\n`GET /salesorders/SO?orderBy=created%20desc`\",\r\n \"operationId\": \"SalesOrders_GetList_type\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales orders to get.\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"customerId\",\r\n \"in\": \"query\",\r\n \"description\": \"The customer for which to retrieve orders. If omitted or empty, orders for all customers are included\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"status\",\r\n \"in\": \"query\",\r\n \"description\": \"The order status to include in the result. If omitted or empty, orders with any status are included.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"modifiedSince\",\r\n \"in\": \"query\",\r\n \"description\": \"A date/time value for filtering when a sales order last changed.\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of customers retrieved per page\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 100\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"The zero based page index to retrieve\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 0\r\n }\r\n },\r\n {\r\n \"name\": \"orderBy\",\r\n \"in\": \"query\",\r\n \"description\": \"The field to order the list by. Can be one of `created`, `lastModified`, or `orderId` followed by an optional sort direction (`asc` or `desc`), default direction is `asc` (ascending) if not present.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"filter\",\r\n \"in\": \"query\",\r\n \"description\": \"A filter for the list, applied to the OrderId, CustomerOrderNumber and CustomerName\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Returns a list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderListDto found.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If `pageSize` or `pageIndex` is not within the allowed range, or if an invalid `orderBy` is specified\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets a paged list with sales orders of any type.\",\r\n \"description\": \"Sample requests:\\r\\n \\r\\n`GET /salesorders`\\r\\n \\r\\n`GET /salesorders?customerId=10000&status=Open&pageSize=10`\\r\\n \\r\\n`GET /salesorders?orderBy=lastModified%20asc`\",\r\n \"operationId\": \"SalesOrders_GetList_\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"customerId\",\r\n \"in\": \"query\",\r\n \"description\": \"The customer for which to retrieve orders. If omitted or empty, orders for all customers are included\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"status\",\r\n \"in\": \"query\",\r\n \"description\": \"The order status to include in the result. If omitted or empty, orders with any status are included.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"modifiedSince\",\r\n \"in\": \"query\",\r\n \"description\": \"A date/time value for filtering when a sales order last changed.\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of customers retrieved per page\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 100\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"The zero based page index to retrieve\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 0\r\n }\r\n },\r\n {\r\n \"name\": \"orderBy\",\r\n \"in\": \"query\",\r\n \"description\": \"The field to order the list by. Can be one of `created`, `lastModified`, or `orderId` followed by an optional sort direction (`asc` or `desc`), default direction is `asc` (ascending) if not present.\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"filter\",\r\n \"in\": \"query\",\r\n \"description\": \"A filter for the list, applied to the OrderId, CustomerOrderNumber and CustomerName\",\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"Returns a list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderListDto found.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If `pageSize` or `pageIndex` is not within the allowed range, or if an invalid `orderBy` is specified\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"post\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Adds a new sales order to the system\",\r\n \"description\": \"Sample requests:\\r\\n \\r\\n```\\r\\nPOST /salesorders\\r\\n{\\r\\n \\\"customer\\\": {\\r\\n \\\"id\\\": \\\"10001\\\",\\r\\n },\\r\\n \\\"type\\\": \\\"SO\\\"\\r\\n}\\r\\n```\\r\\n```\\r\\nPOST /salesorders\\r\\n{\\r\\n \\\"customer\\\": {\\r\\n \\\"id\\\": \\\"10000\\\",\\r\\n \\\"order\\\": \\\"some-customer-order-nbr\\\"\\r\\n },\\r\\n \\\"type\\\": \\\"SO\\\",\\r\\n \\\"description\\\": \\\"sample request order\\\",\\r\\n \\\"status\\\": \\\"Hold\\\",\\r\\n \\\"orderLines\\\": [\\r\\n {\\r\\n \\\"inventoryId\\\": \\\"StockItem1\\\",\\r\\n \\\"quantity\\\": 4,\\r\\n \\\"unitPrice\\\": 101.25\\r\\n }\\r\\n ]\\r\\n}\\r\\n```\",\r\n \"operationId\": \"SalesOrders_CreateNewItem_\",\r\n \"requestBody\": {\r\n \"description\": \"Information about the sales order to create\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderCommand\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderCommand\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderCommand\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"201\": {\r\n \"description\": \"The order was created successfully, and the Location request header contains the address to call to GET the new sales order\",\r\n \"headers\": {\r\n \"Location\": {\r\n \"description\": \"Location of the newly created resource\",\r\n \"schema\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location of the newly created resource\",\r\n \"format\": \"\"\r\n }\r\n }\r\n }\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in command is not present or active, or is outside the allowed range\\r\\n See #/components/x-visma-erp-error-codes for the full list of error codes.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"409\": {\r\n \"description\": \"Conflict\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/rotrut\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets ROT/RUT information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000123/rotrut`\",\r\n \"operationId\": \"SalesOrders_GetItemRotRut_typeorderIdrotrut\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderRotRutDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderRotRutDto\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderRotRutDto\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderRotRutDto\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/commissions\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets commission information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/commissions`\",\r\n \"operationId\": \"SalesOrders_GetItemCommissions_typeorderIdcommissions\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderCommissionDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderCommissionDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderCommissionDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderCommissionDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/lines\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets sales order lines for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/lines`\",\r\n \"operationId\": \"SalesOrders_GetItemLines_typeorderIdlines\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"pageSize\",\r\n \"in\": \"query\",\r\n \"description\": \"The number of lines retrieved per page, defaults to 1000 if not specified\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 1000\r\n }\r\n },\r\n {\r\n \"name\": \"pageIndex\",\r\n \"in\": \"query\",\r\n \"description\": \"The zero based page index to retrieve, defaults to 0 if not specified\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"default\": 0\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.PagedResult`1 object if sales order is found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDtoPagedResult\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDtoPagedResult\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDtoPagedResult\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"patch\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Make modifications to an existing sales order lines\",\r\n \"description\": \"If-Match header represents a version of Sales Order to be modified and must be included in request.\\r\\nValue of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header.\",\r\n \"operationId\": \"SalesOrders_PatchLines_typeorderIdlines\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of the order to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The order number to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"requestBody\": {\r\n \"description\": \"Data to change about the sales order lines\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderLinesCommand\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderLinesCommand\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderLinesCommand\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The order was modified successfully\"\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in command is outside the allowed range\\r\\n See #/components/x-visma-erp-error-codes for the full list of error codes.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"The order specified was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"412\": {\r\n \"description\": \"Order version does not match with If-Match header\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"428\": {\r\n \"description\": \"If-Match header was not supplied\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"delete\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Delete lines from an existing sales order\",\r\n \"description\": \"If-Match header represents a version of Sales Order to be modified and must be included in request.\\r\\nValue of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header.\",\r\n \"operationId\": \"SalesOrders_DeleteLines_typeorderIdlines\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of the order to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The order number to make modifications to\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"ids\",\r\n \"in\": \"query\",\r\n \"description\": \"Lines to delete with comma seprator. Limit of line ids is 1000.\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The lines were deleted successfully\"\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in ids is outside the allowed range\\r\\n See #/components/x-visma-erp-error-codes for the full list of error codes.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Specified order was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"post\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Adds new lines to a existing sales order in the system\",\r\n \"description\": \"If-Match header represents a version of Sales Order to be modified and must be included in request.\\r\\nValue of current version is included in GET /salesorders/{type}/{orderId} and modification endpoints on that resource as ETag header.\",\r\n \"operationId\": \"SalesOrders_AddLines_typeorderIdlines\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"requestBody\": {\r\n \"description\": \"Information about the lines to create\",\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AddSalesOrderLinesCommand\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AddSalesOrderLinesCommand\"\r\n }\r\n },\r\n \"application/*+json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/AddSalesOrderLinesCommand\"\r\n }\r\n }\r\n }\r\n },\r\n \"responses\": {\r\n \"202\": {\r\n \"description\": \"The order lines where created successfully, and the Location request header contains the address to call to GET the new sales order\"\r\n },\r\n \"400\": {\r\n \"description\": \"If any of values in command is not present or active, or is outside the allowed range\\r\\n Specified order was not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderValidationProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"Not Found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"405\": {\r\n \"description\": \"Method Not Allowed\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"write\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/lines/{lineId}\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets a specific sales order line for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/lines/1`\",\r\n \"operationId\": \"SalesOrders_GetItemLine_typeorderIdlineslineId\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"lineId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the line to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderLineDto object if sales order line is found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDto\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDto\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDto\"\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible\\r\\n or the line with the id lineId is not found\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/tax\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets tax information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/tax`\",\r\n \"operationId\": \"SalesOrders_GetItemTax_typeorderIdtax\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderTaxDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderTaxDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderTaxDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderTaxDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/shipment\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets shipment information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/shipment`\",\r\n \"operationId\": \"SalesOrders_GetSalesOrderShipment_typeorderIdshipment\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderShipmentDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderShipmentDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderShipmentDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderShipmentDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/discounts\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets discount details information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/discounts`\",\r\n \"operationId\": \"SalesOrders_GetItemDiscounts_typeorderIddiscounts\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDiscountDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDiscountDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDiscountDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderDiscountDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n \"/api/v3/SalesOrders/{type}/{orderId}/payments\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"SalesOrders\"\r\n ],\r\n \"summary\": \"Gets payments detail information for a single sales order\",\r\n \"description\": \"Sample request:\\r\\n \\r\\n`GET /salesorders/SO/000101/payments`\",\r\n \"operationId\": \"SalesOrders_GetItemPayments_typeorderIdpayments\",\r\n \"parameters\": [\r\n {\r\n \"name\": \"type\",\r\n \"in\": \"path\",\r\n \"description\": \"The type of sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n {\r\n \"name\": \"orderId\",\r\n \"in\": \"path\",\r\n \"description\": \"The id of the sales order to get\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"A list of Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderPaymentDto if found and accessible\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/PaymentDto\"\r\n }\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/PaymentDto\"\r\n }\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/PaymentDto\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"404\": {\r\n \"description\": \"If an order with type type and orderId is not found, or is not accessible.\",\r\n \"content\": {\r\n \"text/plain\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n },\r\n \"text/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ProblemDetails\"\r\n }\r\n }\r\n }\r\n },\r\n \"401\": {\r\n \"description\": \"Unauthorized\"\r\n },\r\n \"403\": {\r\n \"description\": \"Forbidden\"\r\n }\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": [\r\n \"read\"\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"components\": {\r\n \"schemas\": {\r\n \"AddSalesOrderLinesCommand\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lines\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderLineDto\"\r\n },\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"AddressDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The address id\",\r\n \"format\": \"int32\"\r\n },\r\n \"overridesDefault\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this address overrides the default address\"\r\n },\r\n \"line1\": {\r\n \"type\": \"string\",\r\n \"description\": \"Address line 1\",\r\n \"nullable\": true\r\n },\r\n \"line2\": {\r\n \"type\": \"string\",\r\n \"description\": \"Address line 2\",\r\n \"nullable\": true\r\n },\r\n \"line3\": {\r\n \"type\": \"string\",\r\n \"description\": \"Address line 3\",\r\n \"nullable\": true\r\n },\r\n \"postalCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"The postal code\",\r\n \"nullable\": true\r\n },\r\n \"city\": {\r\n \"type\": \"string\",\r\n \"description\": \"The city\",\r\n \"nullable\": true\r\n },\r\n \"country\": {\r\n \"$ref\": \"#/components/schemas/CdNamePairDto\"\r\n },\r\n \"county\": {\r\n \"$ref\": \"#/components/schemas/CdNamePairDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"AllocationDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"inventoryId\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"lotSerialNumber\": {\r\n \"maxLength\": 100,\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"quantity\": {\r\n \"type\": \"number\",\r\n \"format\": \"double\"\r\n },\r\n \"expirationDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"allocated\": {\r\n \"type\": \"boolean\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"AllocationDtoRead\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"inventoryId\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"lotSerialNumber\": {\r\n \"maxLength\": 100,\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"quantity\": {\r\n \"type\": \"number\",\r\n \"format\": \"double\"\r\n },\r\n \"expirationDate\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"allocated\": {\r\n \"type\": \"boolean\"\r\n },\r\n \"unitOfMeasure\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"AttachmentDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"format\": \"uuid\"\r\n },\r\n \"revision\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CdDescriptionPairDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CdNamePairDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"The name\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"ContactDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The id of the contact\",\r\n \"format\": \"int32\"\r\n },\r\n \"overridesDefault\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this overrides the default contact\"\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"The name of the contact\",\r\n \"nullable\": true\r\n },\r\n \"attention\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any attention for the contact\",\r\n \"nullable\": true\r\n },\r\n \"email\": {\r\n \"type\": \"string\",\r\n \"description\": \"The e-mail address of the contact\",\r\n \"nullable\": true\r\n },\r\n \"phone1\": {\r\n \"type\": \"string\",\r\n \"description\": \"The phone number of the contact\",\r\n \"nullable\": true\r\n },\r\n \"phone2\": {\r\n \"type\": \"string\",\r\n \"description\": \"The secondary phone number of the contact\",\r\n \"nullable\": true\r\n },\r\n \"fax\": {\r\n \"type\": \"string\",\r\n \"description\": \"The fax number of the contact\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CustomFieldsDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"customStr1\": {\r\n \"type\": \"string\",\r\n \"description\": \"A free custom colum of type string with max length 100.\",\r\n \"nullable\": true\r\n },\r\n \"customStr2\": {\r\n \"type\": \"string\",\r\n \"description\": \"A free custom colum of type string with max length 100.\",\r\n \"nullable\": true\r\n },\r\n \"customStr3\": {\r\n \"type\": \"string\",\r\n \"description\": \"A free custom colum of type string with max length 100.\",\r\n \"nullable\": true\r\n },\r\n \"customStr4\": {\r\n \"type\": \"string\",\r\n \"description\": \"A free custom colum of type string with max length 100.\",\r\n \"nullable\": true\r\n },\r\n \"customStr5\": {\r\n \"type\": \"string\",\r\n \"description\": \"A free custom colum of type string with max length 100.\",\r\n \"nullable\": true\r\n },\r\n \"customDec1\": {\r\n \"type\": \"number\",\r\n \"description\": \"A free custom colum of type decimal with max 4 decimals.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"customDec2\": {\r\n \"type\": \"number\",\r\n \"description\": \"A free custom colum of type decimal with max 4 decimals.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"customInt1\": {\r\n \"type\": \"integer\",\r\n \"description\": \"A free custom colum of type int\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"customInt2\": {\r\n \"type\": \"integer\",\r\n \"description\": \"A free custom colum of type int\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"customDateTimeUtc1\": {\r\n \"type\": \"string\",\r\n \"description\": \"A free custom colum of type DateTime - in UTC timezone\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CustomerDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal unique id\",\r\n \"format\": \"int32\"\r\n },\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"Unique id for the customer\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"The name of the customer\",\r\n \"nullable\": true\r\n },\r\n \"currencyId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The currency Id used by the customer\",\r\n \"nullable\": true\r\n },\r\n \"customerClassId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The class of the customer\",\r\n \"nullable\": true\r\n },\r\n \"defaultLocation\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationDto\"\r\n },\r\n \"addressLine1\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's first address line\",\r\n \"nullable\": true\r\n },\r\n \"addressLine2\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's second address line\",\r\n \"nullable\": true\r\n },\r\n \"postalCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's postal code\",\r\n \"nullable\": true\r\n },\r\n \"country\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's country code\",\r\n \"nullable\": true\r\n },\r\n \"salutation\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's salutation\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's status code\",\r\n \"nullable\": true\r\n },\r\n \"exportType\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"salesEuAccountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's EU sales account\",\r\n \"nullable\": true\r\n },\r\n \"salesNonTaxableAccountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's non taxable sales account\",\r\n \"nullable\": true\r\n },\r\n \"salesAccountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's sales account\",\r\n \"nullable\": true\r\n },\r\n \"salesExportAccountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer's export sales account\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.CustomerDto class Defines a customer\"\r\n },\r\n \"CustomerDtoPagedResult\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"value\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/CustomerDto\"\r\n },\r\n \"description\": \"Gets or sets the items that are paged\",\r\n \"nullable\": true\r\n },\r\n \"nextPage\": {\r\n \"type\": \"string\",\r\n \"description\": \"Gets or sets the link to the next page with more results. If set to null then no more records are present.\",\r\n \"nullable\": true\r\n },\r\n \"totalCount\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CustomerLocationDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location id\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location description\",\r\n \"nullable\": true\r\n },\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal id of the customer location\",\r\n \"format\": \"int32\"\r\n },\r\n \"countryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The country code of the location\",\r\n \"nullable\": true\r\n },\r\n \"gln\": {\r\n \"type\": \"string\",\r\n \"description\": \"The global localization number of the location\",\r\n \"nullable\": true\r\n },\r\n \"taxRegistrationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The tax registration id of the location\",\r\n \"nullable\": true\r\n },\r\n \"corporateId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The corporate id of the location\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The site id of the location\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"CustomerLocationItemDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location id\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location description\",\r\n \"nullable\": true\r\n },\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal id of the customer location\",\r\n \"format\": \"int32\"\r\n },\r\n \"countryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The country code of the location\",\r\n \"nullable\": true\r\n },\r\n \"gln\": {\r\n \"type\": \"string\",\r\n \"description\": \"The global localization number of the location\",\r\n \"nullable\": true\r\n },\r\n \"taxRegistrationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The tax registration id of the location\",\r\n \"nullable\": true\r\n },\r\n \"corporateId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The corporate id of the location\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The site id of the location\",\r\n \"nullable\": true\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/AddressDto\"\r\n },\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/ContactDto\"\r\n },\r\n \"priceClassId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Price class\",\r\n \"nullable\": true\r\n },\r\n \"fobPointId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Default FobPointId\",\r\n \"nullable\": true\r\n },\r\n \"shipTermsId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Default ShipTermsId\",\r\n \"nullable\": true\r\n },\r\n \"shipZoneId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Default ShipZoneId\",\r\n \"nullable\": true\r\n },\r\n \"shipViaId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The ship via id that represents the carrier and its service to be used for shipping the ordered goods\",\r\n \"nullable\": true\r\n },\r\n \"residentialDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Default ResidentialDelivery\"\r\n },\r\n \"saturdayDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Default SaturdayDelivery\"\r\n },\r\n \"insurance\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Default Insurance\"\r\n },\r\n \"priority\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Default Priority\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"shippingRule\": {\r\n \"type\": \"string\",\r\n \"description\": \"Shipping rule of the customer set default for the order\\r\\n\\nIs one of the following options:\\nCancelRemainder: The ordered quantity should be delivered in one shipmentBackOrderAllowed: The ordered quantity can be delivered in multiple shipments.ShipComplete: The ordered quantity should be delivered in one shipment.\",\r\n \"nullable\": true\r\n },\r\n \"preferredWarehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The preferred shipping warehouse of the customer set default for the order\",\r\n \"nullable\": true\r\n },\r\n \"leadTime\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The number of days required for the shipped goods to reach the customer.\\r\\nUsed in the calculation of the scheduled shipment date\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"taxZoneId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The location tax/VAT zone id\",\r\n \"nullable\": true\r\n },\r\n \"exportType\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"salesEuAccountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location EU Sales Account\",\r\n \"nullable\": true\r\n },\r\n \"salesNonTaxableAccountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location non taxable sales account\",\r\n \"nullable\": true\r\n },\r\n \"salesAccountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location sales account\",\r\n \"nullable\": true\r\n },\r\n \"salesExportAccountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Location export sales account\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"DtoLink\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"href\": {\r\n \"type\": \"string\",\r\n \"description\": \"A link to the item in question\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"EmployeeDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The internal unique identifier of the employee\",\r\n \"nullable\": true\r\n },\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the employee\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"IdDescriptionPairDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The id\",\r\n \"format\": \"int32\"\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"InventoryAvailabilityExpansions\": {\r\n \"enum\": [\r\n \"None\",\r\n \"Location\",\r\n \"Attribute\",\r\n \"LotSerial\",\r\n \"All\"\r\n ],\r\n \"type\": \"string\",\r\n \"description\": \"Defines expansion options for the inventory summary endpoint.\"\r\n },\r\n \"InventoryItemAvailabilityDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"inventoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The inventory id (InventoryCd)\",\r\n \"nullable\": true\r\n },\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The internal Id used by the system to identify the inventory item\",\r\n \"format\": \"int32\"\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description of the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"baseUnit\": {\r\n \"type\": \"string\",\r\n \"description\": \"The base unit for the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"availability\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/WarehouseAvailabilityDto\"\r\n },\r\n \"description\": \"Warehouse information for the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"attributes\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"string\"\r\n },\r\n \"description\": \"Attributes applied to the inventory item\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Inventory summary for a specific inventory item\"\r\n },\r\n \"InventoryItemAvailabilityDtoPagedResult\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"value\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/InventoryItemAvailabilityDto\"\r\n },\r\n \"description\": \"Gets or sets the items that are paged\",\r\n \"nullable\": true\r\n },\r\n \"nextPage\": {\r\n \"type\": \"string\",\r\n \"description\": \"Gets or sets the link to the next page with more results. If set to null then no more records are present.\",\r\n \"nullable\": true\r\n },\r\n \"totalCount\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"KitAssemblyDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"referenceNumber\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"LocationAvailabilityDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalLocationId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The internal id used by the sytem for this location\",\r\n \"format\": \"int32\"\r\n },\r\n \"locationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The location id (LocationCd) for this location\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description of the location\",\r\n \"nullable\": true\r\n },\r\n \"quantityOnHand\": {\r\n \"type\": \"number\",\r\n \"description\": \"Physical quantity on-hand of items in the specific location\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityAvailable\": {\r\n \"type\": \"number\",\r\n \"description\": \"You can configure the way this estimated quantity is calculated by using availability\\r\\ncalculation rules. The available quantity may include anticipated transactions and therefore\\r\\nmay be less than or greater than the QuantityOnHand. Anticipated transactions correspond\\r\\nto the documents and transactions that have been entered in the system but not yet\\r\\nprocessed to the end.\\r\\nIn the availability calculation settings of an item class, you specify which anticipated\\r\\ntransactions affect the available quantity. Thus, the available quantity may include\\r\\ngoods on purchase orders and exclude the goods allocated for sales orders. You can use\\r\\nthe available quantity as an indicator of demand.\\r\\nNote: For quantities on warehouse location level, only quantities added specifically for the location are taken into consideration in quantityAvailable\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityNotAvailable\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity stored at locations not included in the availability calculation.\\r\\nFor each warehouse location, the 'Include in Qty. Available' check box on the\\r\\nWarehouses(IN204000) screen defines whether the quantity of items stored at this\\r\\nlocation is included in the quantity of available items.\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityAvailableForShipment\": {\r\n \"type\": \"number\",\r\n \"description\": \"Estimated quantity calculated by using the following formula: the QuantityOnHand minus the quantity on unreleased inventory\\r\\nissues, minus the quantity allocated for shipping. Thus, the QuantityAvailableForShipment can be less than the QuantityOnHand.\\r\\nNote: For quantities on warehouse location level, only quantities added specifically for the location are taken into consideration in quantityAvailableForShipment\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityPurchaseOrders\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of the inventory item included in open purchase orders.\\r\\nNote: For quantities on warehouse location level, only quantities added specifically for the location are taken into consideration\",\r\n \"format\": \"double\"\r\n },\r\n \"lastModified\": {\r\n \"type\": \"string\",\r\n \"description\": \"Date and time this entry for this location was modified\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"lotSerials\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/LotSerialAvailabilityDto\"\r\n },\r\n \"description\": \"LOT/Serial information\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"LocationDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines a warehouse location\"\r\n },\r\n \"LotSerialAvailabilityDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lotSerialNumber\": {\r\n \"type\": \"string\",\r\n \"description\": \"Id/number of the LOT/Serial\",\r\n \"nullable\": true\r\n },\r\n \"expirationDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Expiration date of the LOT/Serial\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"quantityOnHand\": {\r\n \"type\": \"number\",\r\n \"description\": \"Physical quantity on-hand of item LOT/Serial id\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityAvailable\": {\r\n \"type\": \"number\",\r\n \"description\": \"Quantity available of item LOT/Serial id according to set availability calculation rules\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityAvailableForShipment\": {\r\n \"type\": \"number\",\r\n \"description\": \"Quantity of item LOT/Serial id available for shipping\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityNotAvailable\": {\r\n \"type\": \"number\",\r\n \"description\": \"Quantity of item LOT/Serial id not included in the availability calculation\",\r\n \"format\": \"double\"\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Inventory summary for a specific lot/serial number\"\r\n },\r\n \"NewSalesOrderAddressDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"line1\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 1\",\r\n \"nullable\": true\r\n },\r\n \"line2\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 2\",\r\n \"nullable\": true\r\n },\r\n \"line3\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 3\",\r\n \"nullable\": true\r\n },\r\n \"postalCode\": {\r\n \"maxLength\": 20,\r\n \"type\": \"string\",\r\n \"description\": \"The postal code\",\r\n \"nullable\": true\r\n },\r\n \"city\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"The city\",\r\n \"nullable\": true\r\n },\r\n \"countryId\": {\r\n \"maxLength\": 2,\r\n \"type\": \"string\",\r\n \"description\": \"The country. Required when setting the address.\",\r\n \"nullable\": true\r\n },\r\n \"stateId\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"The state\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines a new address when creating a sales order.\\r\\nWhen the address information is provided, it is expected to provide all needed fields for the address(line1, line2, countryId etc).\\r\\nNo default values from the customer will be set for the non defined address fields.\"\r\n },\r\n \"NewSalesOrderBillingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderContactDto\"\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderAddressDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderCommand\": {\r\n \"required\": [\r\n \"customer\",\r\n \"type\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the type id of an active sales order type to create\"\r\n },\r\n \"orderId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the new id that should be assigned to the new sales order.\\r\\nThis is required if the specified Visma.net.ERP.SalesOrders.Api.Application.Commands.NewSalesOrder.NewSalesOrderCommand.Type has manual numbering set up or Visma.net.ERP.SalesOrders.Api.Application.Commands.NewSalesOrder.NewSalesOrderCommand.OverrideNumberSeries from the request is true.\\r\\nIf not, it should be null or empty.\",\r\n \"nullable\": true\r\n },\r\n \"currencyId\": {\r\n \"maxLength\": 5,\r\n \"type\": \"string\",\r\n \"description\": \"Override the CurrencyId for the order. Must be a valid currency Id. If not specified, the customer's currency is used if not null. If null, company base currency is used\",\r\n \"nullable\": true\r\n },\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the order date of the order to create. If not supplied, the current date will be used\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"requestOn\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the requested on date for the order to create. If not supplied, the current date will be used\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"cancelBy\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the cancel by date for the order to create. If not supplied, the order type's days to keep will be added to the current date to determine the value of this field\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the description for the order to create\\r\\n\\nNote that text fields should not contain any personally identifiable or otherwise sensitive data\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the initial status code for the order. Must be null, empty or one of \\\"Open\\\" or \\\"Hold\\\". If not supplied the value will be determined by the sales order type.\",\r\n \"nullable\": true\r\n },\r\n \"customer\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderCustomerDto\"\r\n },\r\n \"print\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderPrintDto\"\r\n },\r\n \"shipping\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderShippingDto\"\r\n },\r\n \"billing\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderBillingDto\"\r\n },\r\n \"financialInformation\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderFinancialInfoDto\"\r\n },\r\n \"ownerId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the owner (employee) for the order\",\r\n \"nullable\": true\r\n },\r\n \"orderLines\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderLineDto\"\r\n },\r\n \"description\": \"The lines that are added to the order upon creation\",\r\n \"nullable\": true\r\n },\r\n \"taxZoneId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Override the TaxZoneId for the order. If not specified, the customer's location's TaxZoneId will be used\",\r\n \"nullable\": true\r\n },\r\n \"note\": {\r\n \"maxLength\": 2048,\r\n \"type\": \"string\",\r\n \"description\": \"Any note to apply to the order header.\",\r\n \"nullable\": true\r\n },\r\n \"paymentSettings\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderPaymentSettings\"\r\n },\r\n \"useReplacementCostForMarginAndProfit\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"When this option is set to `true`, the `costTotal` of the order will be calculated based on `replacementUnitCost`.\\r\\nIf option is set to `false`, the `costTotal` will be calculated based on `unitCost`\",\r\n \"nullable\": true\r\n },\r\n \"freight\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderFreightDto\"\r\n },\r\n \"branchId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"The branch with which this order is associated. Prio for setting the Branch ID being:\\r\\nBranchID set in bodyBranchID from call headerBranchID from customer locationCompany's default branch ID\",\r\n \"nullable\": true\r\n },\r\n \"originalOrderType\": {\r\n \"maxLength\": 2,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the type code for the original sales order.\\r\\nIf order is deleted and the field contains a order type/order number used as quote and is in status Complete, the original quote order will be reset to Open status\",\r\n \"nullable\": true\r\n },\r\n \"originalOrderId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the unique identifier of the original order\\r\\nIf order is deleted and the field contains a order type/order number used as quote and is in status Complete, the original quote order will be reset to Open status\",\r\n \"nullable\": true\r\n },\r\n \"salesPersonId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets default sales person for the order\",\r\n \"nullable\": true\r\n },\r\n \"projectId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"The project with which this sales order is associated\",\r\n \"nullable\": true\r\n },\r\n \"isRotRutDeductible\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether the order is ROT/RUT deductible\",\r\n \"nullable\": true\r\n },\r\n \"rotRutDetails\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderRotRutDetailsDto\"\r\n },\r\n \"overrideNumberSeries\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Used to override the orderId that would else be set automatically by the system. When set true, also orderId should be provided\"\r\n },\r\n \"customFields\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderCustomFieldsDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderContactDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"name\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the full name of the contact\",\r\n \"nullable\": true\r\n },\r\n \"attention\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets any attention for the contact\",\r\n \"nullable\": true\r\n },\r\n \"phone1\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the primary phone number of the contact\",\r\n \"nullable\": true\r\n },\r\n \"email\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the e-mail address of the contact, multiple e-mails can be separated by semicolon\",\r\n \"format\": \"email\",\r\n \"nullable\": true\r\n },\r\n \"emails\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n },\r\n \"nullable\": true,\r\n \"readOnly\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines a new contact when creating a new sales order.\\r\\nWhen the contact information is provided, it is expected to provide all needed fields for the contact(name, attention etc).\\r\\nNo default values from the customer will be set for the non defined contact fields.\"\r\n },\r\n \"NewSalesOrderCustomFieldsDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"customStr1\": {\r\n \"type\": \"string\",\r\n \"description\": \"A free custom colum of type string with max length 100.\",\r\n \"nullable\": true\r\n },\r\n \"customStr2\": {\r\n \"type\": \"string\",\r\n \"description\": \"A free custom colum of type string with max length 100.\",\r\n \"nullable\": true\r\n },\r\n \"customStr3\": {\r\n \"type\": \"string\",\r\n \"description\": \"A free custom colum of type string with max length 100.\",\r\n \"nullable\": true\r\n },\r\n \"customStr4\": {\r\n \"type\": \"string\",\r\n \"description\": \"A free custom colum of type string with max length 100.\",\r\n \"nullable\": true\r\n },\r\n \"customStr5\": {\r\n \"type\": \"string\",\r\n \"description\": \"A free custom colum of type string with max length 100.\",\r\n \"nullable\": true\r\n },\r\n \"customDec1\": {\r\n \"type\": \"number\",\r\n \"description\": \"A free custom colum of type decimal with max 4 decimals.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"customDec2\": {\r\n \"type\": \"number\",\r\n \"description\": \"A free custom colum of type decimal with max 4 decimals.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"customInt1\": {\r\n \"type\": \"integer\",\r\n \"description\": \"A free custom colum of type int\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"customInt2\": {\r\n \"type\": \"integer\",\r\n \"description\": \"A free custom colum of type int\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"customDateTimeUtc1\": {\r\n \"type\": \"string\",\r\n \"description\": \"A free custom colum of type DateTime - in UTC timezone\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderCustomerDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique id of the the customer\",\r\n \"nullable\": true\r\n },\r\n \"contactId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The contact id for the customer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"order\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"The customer order text\",\r\n \"nullable\": true\r\n },\r\n \"refNo\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"The customer ref number text\",\r\n \"nullable\": true\r\n },\r\n \"locationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the location for the customer supplied to use on the order.\\r\\nMust be a valid active location for the customer supplied in Visma.net.ERP.SalesOrders.Api.Dto.NewSalesOrder.NewSalesOrderCustomerDto.Id\",\r\n \"nullable\": true\r\n },\r\n \"termsId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the terms to use for the sales order.\\r\\nMust be a valid terms identifier\",\r\n \"nullable\": true\r\n },\r\n \"gln\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique global location number of the customer\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderFinancialInfoDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"invoiceSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets if the order should be invoiced/billed separately\",\r\n \"nullable\": true\r\n },\r\n \"invoiceDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the invoice date of the invoice that will be generated for the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"invoiceId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The reference number of the invoice generated for this order.\\r\\nThis can be used if the numbering sequence assigned to invoices is configured for manual numbering.\",\r\n \"nullable\": true\r\n },\r\n \"postPeriod\": {\r\n \"maxLength\": 6,\r\n \"type\": \"string\",\r\n \"description\": \"The post period for the invoice. This can be used to override the financial period. Must be a valid existing financial period.\",\r\n \"nullable\": true\r\n },\r\n \"dueDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The due date for the invoice created for the order. Default due date is set according to the credit terms.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"cashDiscountDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date when the cash discount is available for the invoice created for the order. Default date is set based on the terms selected in the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderFreightDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"cost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight cost calculated for the sales order, can be manually set if orders Ship via code allows it.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"premiumAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The additional freight charges for handling the order.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"taxCategoryId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"The tax category that applies to the freight amount.\\r\\nBy default, it is the tax category associated with the ship via code selected for the order.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderLineDto\": {\r\n \"required\": [\r\n \"inventoryId\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"inventoryId\": {\r\n \"minLength\": 1,\r\n \"type\": \"string\",\r\n \"description\": \"The Inventory Id of the item to add\"\r\n },\r\n \"description\": {\r\n \"maxLength\": 256,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the description of the order line item. This will override the default description from the inventory item\\r\\n\\nNote that text fields should not contain any personally identifiable or otherwise sensitive data\",\r\n \"nullable\": true\r\n },\r\n \"unitOfMeasure\": {\r\n \"maxLength\": 6,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the Unit of measure for the line item. This will override the default UOM for the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"shippingRule\": {\r\n \"type\": \"string\",\r\n \"description\": \"The way the line item should be shipped. This will override the default or the one set on the order head.\\r\\n\\nOne of the following options can be set:\\nCancelRemainder: The ordered quantity should be delivered in one shipmentBackOrderAllowed: The ordered quantity can be delivered in multiple shipments.ShipComplete: The ordered quantity should be delivered in one shipment.\",\r\n \"nullable\": true\r\n },\r\n \"quantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the quantity of items on the order line\",\r\n \"format\": \"double\"\r\n },\r\n \"unitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the unit cost of the product on the line. If no cost is set (null or omitted) the cost will be set\\r\\naccording to predefined rules\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"unitPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the unit price for the product on the line.\\r\\nIf no price is set(null or omitted) the price will be set according to predefined rules based on the inventoryId and the customer.\\r\\nNote that the behavior of the `unitPrice` field is affected by the `hasManualPrice` option.\\r\\nIf `hasManualPrice` is provided and set to \\\"false\\\", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"externalLink\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the external link for the line\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the warehouse the item should be shipped from. This will override the default, or the one set on the order head.\",\r\n \"nullable\": true\r\n },\r\n \"reasonCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the reason code for the line. This must be one of the selectable reason codes\",\r\n \"nullable\": true\r\n },\r\n \"taxCategoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the default tax category id (from customer's class). The value must be one of the selectable Tax Categories\",\r\n \"nullable\": true\r\n },\r\n \"undershipThreshold\": {\r\n \"maximum\": 100,\r\n \"minimum\": 0,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the undership threshold in percent. If not set, information from the inventory item is used\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"overshipThreshold\": {\r\n \"maximum\": 999,\r\n \"minimum\": 100,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the overship threshold in percent. If not set, information from the inventory item is used\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"shipDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the day the order line should be shipped, so that the customer gets it on the requested date (Ship On).\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"requestDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the date the order line is requested (Requested On)\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"salesAccountId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the Sales Account Id of the line. The value must be one of the selectable Accounts.\\r\\nIf not set, a value based on the rules is used\",\r\n \"nullable\": true\r\n },\r\n \"subaccount\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"string\"\r\n },\r\n \"description\": \"Overrides the Subaccount setup for the line.\\r\\nEach entry corresponds to a subaccount id/value pair\",\r\n \"nullable\": true\r\n },\r\n \"note\": {\r\n \"maxLength\": 2048,\r\n \"type\": \"string\",\r\n \"description\": \"Adds a text note to the sales order line.\",\r\n \"nullable\": true\r\n },\r\n \"discountCode\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the discount for the line if applicable. This must be one of the selectable discount codes.\\r\\n\\r\\nNote that the behavior of the 'discountCode' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountCode' is provided, the system will set the discountCode according to the predefined rules.\\r\\n\",\r\n \"nullable\": true\r\n },\r\n \"discountPercent\": {\r\n \"maximum\": 100,\r\n \"minimum\": -100,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the manual percentage discount for the line.\\r\\n\\r\\nNote that the behavior of the 'discountPercent' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountPercent' is provided, the system will set the discountPercent according to the predefined rules.\\r\\n\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the manual currency discount amount for the line.\\r\\n\\r\\nNote that the behavior of the 'discountAmount' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountAmount' is provided, the system will set the discountAmount according to the predefined rules.\\r\\n\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"hasManualDiscount\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that line level discount is applied manually.\\r\\n\\r\\nNote that the behavior of the fields 'discountCode', 'discountPercent' and 'discountAmount' is affected by this option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and discount field(s) is provided, the system will set the line level discounts according to the predefined rules.\\r\\n\",\r\n \"nullable\": true\r\n },\r\n \"warehouseLocationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the warehouse location that will be used for the shipment generated for the order the warehouse location Id for this line. This must be a valid location for `warehouseId` and will override the default if set.\",\r\n \"nullable\": true\r\n },\r\n \"operation\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of operation the line represents to the order. Acceptable values are 'Issue' or 'Receipt'. This must be a valid operation for sales order type.\",\r\n \"nullable\": true\r\n },\r\n \"hasManualPrice\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that the `unitPrice` in this line has been specified manually.\\r\\nIf set to \\\"false\\\", the system updates the unit price in the line according to predefined rules.\\r\\nNote that the behavior of the field `unitPrice` is affected by this option.\\r\\nIf `hasManualPrice` is provided and set to \\\"false\\\", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules.\",\r\n \"nullable\": true\r\n },\r\n \"branchId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"The branch with which this line is associated.\\r\\nIf no `BranchId` is provided, default is set from order `BranchId`\",\r\n \"nullable\": true\r\n },\r\n \"commissionable\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if line is comissionable.\\r\\nIf not set, the default value is picked from the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"salesPersonId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the sales person for the line.\\r\\nIf `SalesPersonId` is provided as (null), the value will be set from from order `SalesPersonId`\",\r\n \"nullable\": true\r\n },\r\n \"purchaseOrderSource\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the purchase source of the line.\\r\\nAccepted values are `dropShip` or `purchaseToOrder`, when no value provided, the default value is picked from the inventory item.\\r\\nIf the value was provided as '' (empty string), the value will set to null.\",\r\n \"nullable\": true\r\n },\r\n \"supplierId\": {\r\n \"type\": \"string\",\r\n \"description\": \"\\r\\n If the actual value was provided as (null), the value will be set from the inventory item preferred supplier.\\r\\n \",\r\n \"nullable\": true\r\n },\r\n \"supplierPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the supplier price for the line item.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"projectTaskId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"The project task with which this sales order line is associated\",\r\n \"nullable\": true\r\n },\r\n \"isRotRutDeductible\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if line is RotRut deductible.\\r\\nIf not set, the default value is picked from the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"sortOrder\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Sort order for line. Lines with provided sort order will be prioritized over lines without sort order.\\r\\nLines without sort order will be placed after lines with sort order.\\r\\nSort order will be automatically changed to consecutive numbers starting from 1.\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"invoiceLineNumber\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The line number of the original invoice to be returned\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"invoiceNumber\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The reference number of the original invoice to be returned\",\r\n \"nullable\": true\r\n },\r\n \"invoiceType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The invoice type of the original invoice to be returned\\r\\n\\nOne of the following options can be set:\\nInvoiceCreditNoteCashSalesCashReturnDebitNote\",\r\n \"nullable\": true\r\n },\r\n \"customFields\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderCustomFieldsDto\"\r\n },\r\n \"inventoryAlternateId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the alternate id for the inventory item on the line.\\r\\nIf the actual value was provided as (null), the value will be set from the inventory item alternate id predicates.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderPaymentSettings\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"paymentMethodId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the default payment method set on the customer. This must be a valid and active payment method id.\",\r\n \"nullable\": true\r\n },\r\n \"cashAccountId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"The cash account associated with the set payment method.\",\r\n \"nullable\": true\r\n },\r\n \"paymentReference\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the external reference number for the order. This must be set if order type requires it.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderRotRutDetailsDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"distributedAutomatically\": {\r\n \"type\": \"boolean\",\r\n \"nullable\": true\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the Rot/Rut type of the order, must be \\\"Rut\\\" or \\\"Rut\\\", if not provided a default value will be set\\r\\nfrom the default Branch settings.\",\r\n \"nullable\": true\r\n },\r\n \"apartment\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the apartment for ROT order, has to be provided together with organisation number. When provided, the estate must be empty\",\r\n \"nullable\": true\r\n },\r\n \"estate\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the estate for ROT order. When provided, the apartment and organisation number must be empty\",\r\n \"nullable\": true\r\n },\r\n \"organisationNumber\": {\r\n \"maxLength\": 20,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the organisation number for ROT order, has to be provided together with apartment. When provided, the estate must be empty\",\r\n \"nullable\": true\r\n },\r\n \"distribution\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/RotRutDistributionDto\"\r\n },\r\n \"description\": \"The person(s) who will receive the tax deduction\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"NewSalesOrderShippingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"scheduledDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the date the shipment is scheduled for\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"shipSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether the order should be shipped separately or included in a batch segment\",\r\n \"nullable\": true\r\n },\r\n \"rule\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the shipping rule for the order\",\r\n \"nullable\": true\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderAddressDto\"\r\n },\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/NewSalesOrderContactDto\"\r\n },\r\n \"preferredWarehouseId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the default site for the customer supplied to use on the order. Must be a valid site id\",\r\n \"nullable\": true\r\n },\r\n \"intrastatTransactionTypeId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Sets the intrastat transaction type id for the sales order, if not supplied the default value from the ordertype will be used. Must be a valid intrastat transaction type id.\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"shipViaId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the unique id that represents the carrier and its service to be used for shipping the ordered goods.\",\r\n \"nullable\": true\r\n },\r\n \"residentialDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether this is residential delivery\",\r\n \"nullable\": true\r\n },\r\n \"saturdayDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether this is a saturday delivery\",\r\n \"nullable\": true\r\n },\r\n \"insurance\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether insurance applies to this shipping\",\r\n \"nullable\": true\r\n },\r\n \"priority\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Sets priority of the order\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"zoneId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the shipping zone of the order freight\",\r\n \"nullable\": true\r\n },\r\n \"fobPointId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the point (such as a city or town) where the title of goods passes from the company to the customer.\",\r\n \"nullable\": true\r\n },\r\n \"termsId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the shipping terms used for the order.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderAddressDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"line1\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 1\",\r\n \"nullable\": true\r\n },\r\n \"line2\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 2\",\r\n \"nullable\": true\r\n },\r\n \"line3\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Address line 3\",\r\n \"nullable\": true\r\n },\r\n \"postalCode\": {\r\n \"maxLength\": 20,\r\n \"type\": \"string\",\r\n \"description\": \"The postal code\",\r\n \"nullable\": true\r\n },\r\n \"city\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"The city\",\r\n \"nullable\": true\r\n },\r\n \"stateId\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"The state\",\r\n \"nullable\": true\r\n },\r\n \"countryId\": {\r\n \"maxLength\": 2,\r\n \"type\": \"string\",\r\n \"description\": \"The country.\",\r\n \"nullable\": true\r\n },\r\n \"overridesDefault\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this address overrides the default address\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines an address when updating a sales order.\\r\\nOnly the provided fields will be changed in address.\"\r\n },\r\n \"PatchSalesOrderBillingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderAddressDto\"\r\n },\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderContactDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderCommand\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the order date of the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"customer\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderCustomerDto\"\r\n },\r\n \"currencyId\": {\r\n \"maxLength\": 5,\r\n \"type\": \"string\",\r\n \"description\": \"Override the CurrencyId for the order. Must be a valid currency Id.\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Description for the order\\r\\n\\nNote that text fields should not contain any personally identifiable or otherwise sensitive data\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the status for the order. Must be \\\"Open\\\", \\\"Hold\\\", \\\"BackOrder\\\", \\\"Cancelled\\\", \\\"Completed\\\". When status is set, no other fields may be patched in the same call\",\r\n \"nullable\": true\r\n },\r\n \"print\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderPrintDto\"\r\n },\r\n \"cancelBy\": {\r\n \"type\": \"string\",\r\n \"description\": \"Cancel by date for the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"shipping\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderShippingDto\"\r\n },\r\n \"billing\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderBillingDto\"\r\n },\r\n \"ownerId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the owner (employee) for the order\",\r\n \"nullable\": true\r\n },\r\n \"salesPersonId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets default sales person for the order\",\r\n \"nullable\": true\r\n },\r\n \"requestOn\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the requested on date for the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"financialInformation\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderFinancialInfoDto\"\r\n },\r\n \"paymentSettings\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderPaymentSettingsDto\"\r\n },\r\n \"note\": {\r\n \"maxLength\": 2048,\r\n \"type\": \"string\",\r\n \"description\": \"Any note to apply to the order header.\",\r\n \"nullable\": true\r\n },\r\n \"taxZoneId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Override the TaxZoneId for the order\",\r\n \"nullable\": true\r\n },\r\n \"useReplacementCostForMarginAndProfit\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"When this option is set to `true`, the `costTotal` of the order will be calculated based on `replacementUnitCost`.\\r\\nIf option is set to `false`, the `costTotal` will be calculated based on `unitCost`\",\r\n \"nullable\": true\r\n },\r\n \"freight\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderFreightDto\"\r\n },\r\n \"branchId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"The branch with which this order is associated.\",\r\n \"nullable\": true\r\n },\r\n \"originalOrderType\": {\r\n \"maxLength\": 2,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the type code for the original sales order\\r\\nIf order is deleted and the field contains a order type/order number used as quote and is in status Complete, the original quote order will be reset to Open status\",\r\n \"nullable\": true\r\n },\r\n \"originalOrderId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the unique identifier of the original order\\r\\nIf order is deleted and the field contains a order type/order number used as quote and is in status Complete, the original quote order will be reset to Open status\",\r\n \"nullable\": true\r\n },\r\n \"projectId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"The project with which this sales order is associated\",\r\n \"nullable\": true\r\n },\r\n \"isRotRutDeductible\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether the order is ROT/RUT deductible\",\r\n \"nullable\": true\r\n },\r\n \"rotRutDetails\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderRotRutDetailsDto\"\r\n },\r\n \"customFields\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderCustomFieldsDto\"\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Application.Commands.PatchSalesOrder.PatchSalesOrderCommand is a command for updating parts of a sales order\"\r\n },\r\n \"PatchSalesOrderContactDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"name\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the full name of the contact\",\r\n \"nullable\": true\r\n },\r\n \"attention\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets any attention for the contact\",\r\n \"nullable\": true\r\n },\r\n \"phone1\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the primary phone number of the contact\",\r\n \"nullable\": true\r\n },\r\n \"email\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the e-mail address of the contact, multiple e-mails can be separated by semicolon\",\r\n \"format\": \"email\",\r\n \"nullable\": true\r\n },\r\n \"emails\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n },\r\n \"nullable\": true,\r\n \"readOnly\": true\r\n },\r\n \"overridesDefault\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this contact overrides the default contact\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines an contact when updating a sales order.\\r\\nOnly the provided fields will be changed in contact.\"\r\n },\r\n \"PatchSalesOrderCustomFieldsDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"customStr1\": {\r\n \"maxLength\": 100,\r\n \"type\": \"string\",\r\n \"description\": \"A free custom colum of type string with max length 100.\",\r\n \"nullable\": true\r\n },\r\n \"customStr2\": {\r\n \"maxLength\": 100,\r\n \"type\": \"string\",\r\n \"description\": \"A free custom colum of type string with max length 100.\",\r\n \"nullable\": true\r\n },\r\n \"customStr3\": {\r\n \"maxLength\": 100,\r\n \"type\": \"string\",\r\n \"description\": \"A free custom colum of type string with max length 100.\",\r\n \"nullable\": true\r\n },\r\n \"customStr4\": {\r\n \"maxLength\": 100,\r\n \"type\": \"string\",\r\n \"description\": \"A free custom colum of type string with max length 100.\",\r\n \"nullable\": true\r\n },\r\n \"customStr5\": {\r\n \"maxLength\": 100,\r\n \"type\": \"string\",\r\n \"description\": \"A free custom colum of type string with max length 100.\",\r\n \"nullable\": true\r\n },\r\n \"customDec1\": {\r\n \"type\": \"number\",\r\n \"description\": \"A free custom colum of type decimal with max 4 decimals.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"customDec2\": {\r\n \"type\": \"number\",\r\n \"description\": \"A free custom colum of type decimal with max 4 decimals.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"customInt1\": {\r\n \"type\": \"integer\",\r\n \"description\": \"A free custom colum of type int\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"customInt2\": {\r\n \"type\": \"integer\",\r\n \"description\": \"A free custom colum of type int\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"customDateTimeUtc1\": {\r\n \"type\": \"string\",\r\n \"description\": \"A free custom colum of type DateTime - in UTC timezone\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderCustomerDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique id of the the customer\",\r\n \"nullable\": true\r\n },\r\n \"refNo\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"The customer ref number text. If null or not supplied the value will not be changed\",\r\n \"nullable\": true\r\n },\r\n \"order\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"The customer order text.\",\r\n \"nullable\": true\r\n },\r\n \"contactId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The contact id for the customer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"termsId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the terms to use for the sales order.\\r\\nMust be a valid terms identifier\",\r\n \"nullable\": true\r\n },\r\n \"locationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the location for the customer supplied to use on the order.\\r\\nMust be a valid active location for the customer/>\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderFinancialInfoDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"invoiceSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets if the order should be invoiced/billed separately\",\r\n \"nullable\": true\r\n },\r\n \"invoiceDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the invoice date of the invoice that will be generated for the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"postPeriod\": {\r\n \"maxLength\": 6,\r\n \"type\": \"string\",\r\n \"description\": \"The post period for the invoice. This can be used to override the financial period. Must be a valid existing financial period.\",\r\n \"nullable\": true\r\n },\r\n \"dueDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The due date for the invoice created for the order. Default due date is set according to the credit terms.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"cashDiscountDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date when the cash discount is available for the invoice created for the order. Default date is set based on the terms selected in the order.\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"invoiceId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The reference number of the invoice generated for this order.\\r\\nThis can be used if the numbering sequence assigned to invoices is configured for manual numbering.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderFreightDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"cost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight cost calculated for the sales order, can be manually set if orders Ship via code allows it.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"premiumAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The additional freight charges for handling the order.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"taxCategoryId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"The tax category that applies to the freight amount.\\r\\nBy default, it is the tax category associated with the ship via code selected for the order.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderLineDto\": {\r\n \"required\": [\r\n \"lineId\"\r\n ],\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lineId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The line id of the line.\",\r\n \"format\": \"int32\"\r\n },\r\n \"reasonCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"Patch the reason code for the line. This must be one of the selectable reason codes\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"maxLength\": 256,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the description of the order line item. This will override the default description from the inventory item\\r\\n\\nNote that text fields should not contain any personally identifiable or otherwise sensitive data\",\r\n \"nullable\": true\r\n },\r\n \"shippingRule\": {\r\n \"type\": \"string\",\r\n \"description\": \"The way the line item should be shipped.\\r\\n\\nOne of the following options can be set:\\nCancelRemainder: The ordered quantity should be delivered in one shipmentBackOrderAllowed: The ordered quantity can be delivered in multiple shipments.ShipComplete: The ordered quantity should be delivered in one shipment.\",\r\n \"nullable\": true\r\n },\r\n \"unitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the unit cost of the product on the line.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"undershipThreshold\": {\r\n \"maximum\": 100,\r\n \"minimum\": 0,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the undership threshold in percent. If not set, information from the inventory item is used\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"overshipThreshold\": {\r\n \"maximum\": 999,\r\n \"minimum\": 100,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the overship threshold in percent. If not set, information from the inventory item is used\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"externalLink\": {\r\n \"maxLength\": 255,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the external link for the line\",\r\n \"nullable\": true\r\n },\r\n \"note\": {\r\n \"maxLength\": 2048,\r\n \"type\": \"string\",\r\n \"description\": \"Any note to apply to the order header.\",\r\n \"nullable\": true\r\n },\r\n \"salesAccountId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the Sales Account Id of the line. The value must be one of the selectable Accounts.\\r\\nIf not set, a value based on the rules is used\",\r\n \"nullable\": true\r\n },\r\n \"projectTaskId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"The project task with which this sales order line is associated\",\r\n \"nullable\": true\r\n },\r\n \"sortOrder\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"shipDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the day the order line should be shipped, so that the customer gets it on the requested date (Ship On).\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"requestDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the date the order line is requested (Requested On)\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"warehouseLocationId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the warehouse location that will be used for the shipment generated for the order the warehouse location Id for this line.\\r\\nThis must be a valid location for `warehouseId` and will override the default if set.\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the warehouse the item should be shipped from. This will override the default, or the one set on the order head.\",\r\n \"nullable\": true\r\n },\r\n \"subaccount\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"string\"\r\n },\r\n \"description\": \"Overrides the Subaccount setup for the line.\\r\\nEach entry corresponds to a subaccount id/value pair\",\r\n \"nullable\": true\r\n },\r\n \"hasManualDiscount\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that line level discount is applied manually.\\r\\n\\r\\nNote that the behavior of the fields 'discountCode', 'discountPercent' and 'discountAmount' is affected by this option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and discount field(s) is provided, the system will set the line level discounts according to the predefined rules.\\r\\n\",\r\n \"nullable\": true\r\n },\r\n \"discountPercent\": {\r\n \"maximum\": 100,\r\n \"minimum\": -100,\r\n \"type\": \"number\",\r\n \"description\": \"Sets the manual percentage discount for the line.\\r\\n\\r\\nNote that the behavior of the 'discountPercent' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountPercent' is provided, the system will set the discountPercent according to the predefined rules.\\r\\n\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the manual currency discount amount for the line.\\r\\n\\r\\nNote that the behavior of the 'discountAmount' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountAmount' is provided, the system will set the discountAmount according to the predefined rules.\\r\\n\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"taxCategoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the default tax category id. The value must be one of the selectable Tax Categories\",\r\n \"nullable\": true\r\n },\r\n \"discountCode\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the discount for the line if applicable. This must be one of the selectable discount codes.\\r\\n\\r\\nNote that the behavior of the 'discountCode' field is affected by the 'hasManualDiscount' option.\\r\\nIf 'hasManualDiscount' is provided and set to \\\"false\\\", and 'discountCode' is provided, the system will set the discountCode according to the predefined rules.\\r\\n\",\r\n \"nullable\": true\r\n },\r\n \"quantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the quantity of items on the order line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"unitOfMeasure\": {\r\n \"maxLength\": 6,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the Unit of measure for the line item. This will override the default UOM for the inventory item\",\r\n \"nullable\": true\r\n },\r\n \"unitPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the unit price for the product on the line.\\r\\nIf no price is set(null or omitted) the price will be set according to predefined rules based on the inventoryId and the customer.\\r\\nNote that the behavior of the `unitPrice` field is affected by the `hasManualPrice` option.\\r\\nIf `hasManualPrice` is provided and set to \\\"false\\\", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"operation\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of operation the line represents to the order. Acceptable values are 'Issue' or 'Receipt'. This must be a valid operation for sales order type.\",\r\n \"nullable\": true\r\n },\r\n \"hasManualPrice\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that the `unitPrice` in this line has been specified manually.\\r\\nIf set to \\\"false\\\", the system updates the unit price in the line according to predefined rules.\\r\\nNote that the behavior of the field `unitPrice` is affected by this option.\\r\\nIf `hasManualPrice` is provided and set to \\\"false\\\", and `unitPrice` is provided, the system will set the `unitPrice` according to the predefined rules.\",\r\n \"nullable\": true\r\n },\r\n \"branchId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the branch with which this line is associated.\\r\\nIf `BranchId` is provided as (null), the value will be set from from order `BranchId`\",\r\n \"nullable\": true\r\n },\r\n \"commissionable\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if line is comissionable.\",\r\n \"nullable\": true\r\n },\r\n \"salesPersonId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the sales person for the line.\\r\\nIf `SalesPersonId` is provided as (null), the value will be set from from order `SalesPersonId`\",\r\n \"nullable\": true\r\n },\r\n \"purchaseOrderSource\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the purchase source of the line.\\r\\nAccepted values are `dropShip` or `purchaseToOrder`, when null provided, value will be set from default value from the inventory item.\\r\\nIf the value was provided as '' (empty string), the value will set to null.\",\r\n \"nullable\": true\r\n },\r\n \"supplierId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the Purchase Order Vendor for the line.\",\r\n \"nullable\": true\r\n },\r\n \"supplierPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"Sets the supplier price for the line item.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"completed\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the line is completed or not.\\r\\nIf provided, this is the only operation that can be performed on the line.\",\r\n \"nullable\": true\r\n },\r\n \"isRotRutDeductible\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if line is RotRut deductible.\",\r\n \"nullable\": true\r\n },\r\n \"invoiceLineNumber\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The line number of the original invoice to be returned\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"invoiceNumber\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The reference number of the original invoice to be returned\",\r\n \"nullable\": true\r\n },\r\n \"invoiceType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The invoice type of the original invoice to be returned\\r\\n\\nOne of the following options can be set:\\nInvoiceCreditNoteCashSalesCashReturnDebitNote\",\r\n \"nullable\": true\r\n },\r\n \"customFields\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderCustomFieldsDto\"\r\n },\r\n \"inventoryAlternateId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the alternate id for the inventory item on the line.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The sales order line which is set to patch\"\r\n },\r\n \"PatchSalesOrderLinesCommand\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lines\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderLineDto\"\r\n },\r\n \"description\": \"The sales order lines that are set to patch\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Application.Commands.PatchSalesOrderLines.PatchSalesOrderLinesCommand is a command for updating the lines of a sales order\"\r\n },\r\n \"PatchSalesOrderPaymentSettingsDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"paymentMethodId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Overrides the default payment method set on the customer. This must be a valid and active payment method id.\",\r\n \"nullable\": true\r\n },\r\n \"cashAccountId\": {\r\n \"maxLength\": 10,\r\n \"type\": \"string\",\r\n \"description\": \"The cash account associated with the set payment method.\",\r\n \"nullable\": true\r\n },\r\n \"paymentReference\": {\r\n \"maxLength\": 40,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the external reference number for the order. This must be set if order type requires it.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderRotRutDetailsDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"distributedAutomatically\": {\r\n \"type\": \"boolean\",\r\n \"nullable\": true\r\n },\r\n \"apartment\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the apartment for ROT order, has to be provided together with organisation number. When provided, the estate must be empty\",\r\n \"nullable\": true\r\n },\r\n \"estate\": {\r\n \"maxLength\": 50,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the estate for ROT order. When provided, the apartment and organisation number must be empty\",\r\n \"nullable\": true\r\n },\r\n \"organisationNumber\": {\r\n \"maxLength\": 20,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the organisation number for ROT order, has to be provided together with apartment. When provided, the estate must be empty\",\r\n \"nullable\": true\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the Rot/Rut type of the order, must be \\\"Rut\\\" or \\\"Rut\\\", if null will be provided a default value will be set\\r\\nfrom the default Branch settings.\",\r\n \"nullable\": true\r\n },\r\n \"distribution\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/RotRutDistributionDto\"\r\n },\r\n \"description\": \"The person(s) who will receive the tax deduction.\\r\\nWhen provided, it will replace the existing distribution.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PatchSalesOrderShippingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"shipSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether the order should be shipped separately or included in a batch segment\",\r\n \"nullable\": true\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderAddressDto\"\r\n },\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/PatchSalesOrderContactDto\"\r\n },\r\n \"preferredWarehouseId\": {\r\n \"maxLength\": 30,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the default site for the customer supplied to use on the order. Must be a valid site id\\r\\nIf empty string, the default site for order will be removed\",\r\n \"nullable\": true\r\n },\r\n \"rule\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the shipping rule for the order\",\r\n \"nullable\": true\r\n },\r\n \"scheduledDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the date the shipment is scheduled for\\r\\nUnless a specific time zone offset is specified with the date (e.g. '2012-12-24T13:30:23+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"intrastatTransactionTypeId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Sets the intrastat transaction type id for the sales order. Must be a valid intrastat transaction type id.\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"shipViaId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"Sets the unique id that represents the carrier and its service to be used for shipping the ordered goods. Must be a valid carrier id.\\r\\nIf empty string then the value will be set to null\",\r\n \"nullable\": true\r\n },\r\n \"residentialDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether this is residential delivery\",\r\n \"nullable\": true\r\n },\r\n \"saturdayDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether this is a saturday delivery\",\r\n \"nullable\": true\r\n },\r\n \"insurance\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Sets whether insurance applies to this shipping\",\r\n \"nullable\": true\r\n },\r\n \"priority\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Sets priority of the order\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"zoneId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Sets the shipping zone of the order freight\",\r\n \"nullable\": true\r\n },\r\n \"fobPointId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the point (such as a city or town) where the title of goods passes from the company to the customer.\",\r\n \"nullable\": true\r\n },\r\n \"termsId\": {\r\n \"maxLength\": 15,\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the shipping terms used for the order.\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"PaymentDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"documentType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of payment document that is applied to the sales order\",\r\n \"nullable\": true\r\n },\r\n \"referenceNumber\": {\r\n \"type\": \"string\",\r\n \"description\": \"The reference number of the payment document\",\r\n \"nullable\": true\r\n },\r\n \"amountAppliedToOrder\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amount of the payment applied to the order\",\r\n \"format\": \"double\"\r\n },\r\n \"billedAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amount of the payment that is applied to the order and transferred to related invoice(s)\",\r\n \"format\": \"double\"\r\n },\r\n \"totalAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total amount of the payment\",\r\n \"format\": \"double\"\r\n },\r\n \"balance\": {\r\n \"type\": \"number\",\r\n \"description\": \"The balance of the payment\",\r\n \"format\": \"double\"\r\n },\r\n \"status\": {\r\n \"type\": \"string\",\r\n \"description\": \"The status of the payment\",\r\n \"nullable\": true\r\n },\r\n \"reference\": {\r\n \"type\": \"string\",\r\n \"description\": \"The external reference number of the payment\",\r\n \"nullable\": true\r\n },\r\n \"paymentMethod\": {\r\n \"type\": \"string\",\r\n \"description\": \"The payment method of the payment\",\r\n \"nullable\": true\r\n },\r\n \"cashAccount\": {\r\n \"type\": \"string\",\r\n \"description\": \"The cash account of the payment\",\r\n \"nullable\": true\r\n },\r\n \"currencyId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The currency for the payment\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"ProblemDetails\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"title\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"detail\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"instance\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": {}\r\n },\r\n \"ProjectDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n },\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal unique identifier of the project\",\r\n \"format\": \"int32\"\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.ProjectDto class defines a project reference for a sales order\"\r\n },\r\n \"RotRutDistributionDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"personalId\": {\r\n \"maxLength\": 20,\r\n \"type\": \"string\",\r\n \"description\": \"The personal ID of the person receiving the tax deduction\",\r\n \"nullable\": true\r\n },\r\n \"extra\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Selection to indicate that this is an extra amount\",\r\n \"nullable\": true\r\n },\r\n \"amount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total amount that is tax deductible\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderBillingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/ContactDto\"\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/AddressDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderCommissionDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"salesPersonId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id of the sales person that gets the commision\",\r\n \"nullable\": true\r\n },\r\n \"percent\": {\r\n \"type\": \"number\",\r\n \"description\": \"The commission percent\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"amount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The commission amount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"commissionableAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The order's commissionable amount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderCustomerDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"An internal unique id of the customer\",\r\n \"format\": \"int32\"\r\n },\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique id of the the customer\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer name\",\r\n \"nullable\": true\r\n },\r\n \"taxZone\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"contactId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The contact id for the customer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"order\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer order text\",\r\n \"nullable\": true\r\n },\r\n \"refNo\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer ref number text\",\r\n \"nullable\": true\r\n },\r\n \"location\": {\r\n \"$ref\": \"#/components/schemas/CustomerLocationDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderDiscountDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"manualOrderIndex\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The number of discount line set for the order\",\r\n \"format\": \"int32\"\r\n },\r\n \"skipDiscount\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the discount has been cancelled for the order and is not applicable\"\r\n },\r\n \"discountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the discount applied to the order\",\r\n \"nullable\": true\r\n },\r\n \"discountSequenceId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The identifier of the discount sequence of the discount ID applied to the order\",\r\n \"nullable\": true\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of discount whose sequence was applied to the document(Group or Document)\",\r\n \"nullable\": true\r\n },\r\n \"isManual\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates that the discount has been applied manually\"\r\n },\r\n \"discountableAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amount used as a base for discount calculation if the discount is based on amount.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountableQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity used as a base for discount calculation if the discount is based on quantity.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amount of the discount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountPercent\": {\r\n \"type\": \"number\",\r\n \"description\": \"The discount percent, if the discount is defined to be calculated as a percentage\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"freeItem\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"freeItemQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of the free item. Used to set the quantity for the order line generate by a free item discount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type code for the sales order\",\r\n \"nullable\": true\r\n },\r\n \"orderId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique identifier of the order\",\r\n \"nullable\": true\r\n },\r\n \"branch\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"Description of the order\",\r\n \"nullable\": true\r\n },\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"Date the order was submitted\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"cancelBy\": {\r\n \"type\": \"string\",\r\n \"description\": \"The cancel date for the order\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"lastModified\": {\r\n \"type\": \"string\",\r\n \"description\": \"Date the order was last modified\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"requestOn\": {\r\n \"type\": \"string\",\r\n \"description\": \"Date the order was requested\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"isRotRutDeductible\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether the order is ROT/RUT deductible\"\r\n },\r\n \"orderQty\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total quantity of inventory items in the order\",\r\n \"format\": \"double\"\r\n },\r\n \"note\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any notes on the order\",\r\n \"nullable\": true\r\n },\r\n \"currencyId\": {\r\n \"type\": \"string\",\r\n \"description\": \"CurrencyId for the order.\",\r\n \"nullable\": true\r\n },\r\n \"useReplacementCostForMarginAndProfit\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"When this option is set to `true`, the `costTotal` of the order will be calculated based on `replacementUnitCost`.\\r\\nIf option is set to `false`, the `costTotal` will be calculated based on `unitCost`\",\r\n \"nullable\": true\r\n },\r\n \"createdBy\": {\r\n \"type\": \"string\",\r\n \"description\": \"The user name of the creator of the order. If the order was created by an API call this field will be null or empty.\",\r\n \"nullable\": true\r\n },\r\n \"project\": {\r\n \"$ref\": \"#/components/schemas/ProjectDto\"\r\n },\r\n \"print\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderPrintDto\"\r\n },\r\n \"billing\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderBillingDto\"\r\n },\r\n \"paymentSettings\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderPaymentDto\"\r\n },\r\n \"financialInformation\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderFinancialInfoDto\"\r\n },\r\n \"owner\": {\r\n \"$ref\": \"#/components/schemas/EmployeeDto\"\r\n },\r\n \"origin\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderOriginDto\"\r\n },\r\n \"shipping\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderShippingDto\"\r\n },\r\n \"status\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderStatusDto\"\r\n },\r\n \"customer\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderCustomerDto\"\r\n },\r\n \"totals\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderTotalsDto\"\r\n },\r\n \"freight\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderFreightDto\"\r\n },\r\n \"originalOrderType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type code for the original sales order\",\r\n \"nullable\": true\r\n },\r\n \"originalOrderId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique identifier of the original order\",\r\n \"nullable\": true\r\n },\r\n \"salesPerson\": {\r\n \"$ref\": \"#/components/schemas/SalesPersonDto\"\r\n },\r\n \"version\": {\r\n \"type\": \"string\",\r\n \"description\": \"An internal order version used for detecting concurrent updates to an order\",\r\n \"format\": \"byte\",\r\n \"nullable\": true\r\n },\r\n \"attachments\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/AttachmentDto\"\r\n },\r\n \"description\": \"The attachments of the order\",\r\n \"nullable\": true\r\n },\r\n \"emailed\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the document was emailed\"\r\n },\r\n \"customFields\": {\r\n \"$ref\": \"#/components/schemas/CustomFieldsDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderExpansions\": {\r\n \"enum\": [\r\n \"None\",\r\n \"Billing\",\r\n \"Payment\",\r\n \"FinancialInformation\",\r\n \"Shipping\",\r\n \"Customer\",\r\n \"Owner\",\r\n \"Origin\",\r\n \"Note\",\r\n \"Freight\",\r\n \"Attachments\",\r\n \"CustomFields\",\r\n \"All\"\r\n ],\r\n \"type\": \"string\",\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.SalesOrderExpansions enumeration defines individual parts of the Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderDto that can be filled\"\r\n },\r\n \"SalesOrderFinancialInfoDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"invoiceSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether the order should be invoiced separately\"\r\n },\r\n \"invoiceId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id of the invoice issued for the order\",\r\n \"nullable\": true\r\n },\r\n \"invoiceDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The invoice date\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"dueDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The due date for the invoice\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"terms\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"cashDiscountDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date for the cash discount\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"postPeriod\": {\r\n \"type\": \"string\",\r\n \"description\": \"The post period for the invoice\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderFreightDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"volume\": {\r\n \"type\": \"number\",\r\n \"format\": \"double\"\r\n },\r\n \"weight\": {\r\n \"type\": \"number\",\r\n \"format\": \"double\"\r\n },\r\n \"cost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight cost calculated for the sales order,\",\r\n \"format\": \"double\"\r\n },\r\n \"costInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight cost calculated for the sales order in base currency.\",\r\n \"format\": \"double\"\r\n },\r\n \"premiumAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The additional freight charges for handling the order.\",\r\n \"format\": \"double\",\r\n \"readOnly\": true\r\n },\r\n \"premiumAmountInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The additional freight charges in base currency for handling the order.\",\r\n \"format\": \"double\",\r\n \"readOnly\": true\r\n },\r\n \"amount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amounts calculated based on the ship terms.\\r\\n///\",\r\n \"format\": \"double\"\r\n },\r\n \"amountInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amounts calculated based on the ship terms in base currency of the order.\",\r\n \"format\": \"double\"\r\n },\r\n \"taxCategoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The tax category that applies to the freight amount.\\r\\nBy default, it is the tax category associated with the ship via code selected for the order.\",\r\n \"nullable\": true,\r\n \"readOnly\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderLineDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lineId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The line number of the sales order line\",\r\n \"format\": \"int32\"\r\n },\r\n \"sortOrder\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Used to apply sort order to a set of lines\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"lineType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of sales order line\",\r\n \"nullable\": true\r\n },\r\n \"operation\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of operation the line represents to the order\",\r\n \"nullable\": true\r\n },\r\n \"orderDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date the order line was added\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"branch\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"inventory\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineInventoryDto\"\r\n },\r\n \"unitOfMeasure\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unit of measure (UOM) for the sales order line\",\r\n \"nullable\": true\r\n },\r\n \"quantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of unit of measure this line represents\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"baseOrderQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The base order quantity for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"unitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The unit cost of items on this order line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"unitPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"The unit price for items on this order line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any description for this order line\",\r\n \"nullable\": true\r\n },\r\n \"shippingRule\": {\r\n \"type\": \"string\",\r\n \"description\": \"The shipping rule code for this order line\",\r\n \"nullable\": true\r\n },\r\n \"completed\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this order line is completed or not\",\r\n \"nullable\": true\r\n },\r\n \"extendedPrice\": {\r\n \"type\": \"number\",\r\n \"description\": \"The extended price for this sales order line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"lineTotalBeforeDiscount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The line total before any discounts are applied\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"exciseDuty\": {\r\n \"type\": \"number\",\r\n \"description\": \"The excise duty amount for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The discount amount for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"externalLink\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any external link for this sales order line\",\r\n \"nullable\": true\r\n },\r\n \"taxCategoryId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The Tax Category Id applying to this order line\",\r\n \"nullable\": true\r\n },\r\n \"reasonCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"The reason code\",\r\n \"nullable\": true\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The Site Id for items on this line\",\r\n \"nullable\": true\r\n },\r\n \"undershipThreshold\": {\r\n \"type\": \"number\",\r\n \"description\": \"The undership threshold value (%)\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"overshipThreshold\": {\r\n \"type\": \"number\",\r\n \"description\": \"The overship threshold value (%)\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"shipDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The expected shipping date for this order line\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"requestDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The request date for this order line\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"note\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any note that has been applied to this order line\",\r\n \"nullable\": true\r\n },\r\n \"salesAccountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The general ledger account this line applies to\",\r\n \"nullable\": true\r\n },\r\n \"subaccount\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"string\"\r\n },\r\n \"description\": \"The general ledger subaccount this line applies to\",\r\n \"nullable\": true\r\n },\r\n \"openQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The open quantity for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"billedQuantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The billed quantity for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"quantityOnShipments\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity on shipments for this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountPercent\": {\r\n \"type\": \"number\",\r\n \"description\": \"Discount percentage applied to this line\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountCode\": {\r\n \"type\": \"string\",\r\n \"description\": \"Code of discount applied to this line\",\r\n \"nullable\": true\r\n },\r\n \"discountSequenceId\": {\r\n \"type\": \"string\",\r\n \"description\": \"Id of discount sequence applied to this line\",\r\n \"nullable\": true\r\n },\r\n \"hasManualDiscount\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Discount is applied manually\"\r\n },\r\n \"freeItem\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether these item(s) are free or not\"\r\n },\r\n \"warehouseLocation\": {\r\n \"$ref\": \"#/components/schemas/LocationDto\"\r\n },\r\n \"replacementUnitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The replacement unit cost of an item. This is set based on the supplier price.\\r\\nIf no supplier price found, the last price of the item's default supplier will be used.\\r\\nIf no default supplier is set, the last cost of the item will be used.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"hasManualPrice\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Unit price is applied manually\"\r\n },\r\n \"inventoryAlternateId\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"openLine\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if line has quantity left to be shipped\"\r\n },\r\n \"commissionable\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if line is comissionable\"\r\n },\r\n \"salesPerson\": {\r\n \"$ref\": \"#/components/schemas/SalesPersonDto\"\r\n },\r\n \"purchaseOrderSource\": {\r\n \"type\": \"string\",\r\n \"description\": \"Information about line purchase order source\",\r\n \"nullable\": true\r\n },\r\n \"supplier\": {\r\n \"$ref\": \"#/components/schemas/SupplierDto\"\r\n },\r\n \"supplierPrice\": {\r\n \"type\": \"number\",\r\n \"format\": \"double\",\r\n \"deprecated\": true\r\n },\r\n \"projectTaskId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The project task with which this sales order line is associated\",\r\n \"nullable\": true\r\n },\r\n \"attachments\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/AttachmentDto\"\r\n },\r\n \"description\": \"The attachments associated with this sales order line\",\r\n \"nullable\": true\r\n },\r\n \"purchaseOrderNumbers\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n },\r\n \"description\": \"The purchase order numbers that are linked to the sales order line\",\r\n \"nullable\": true\r\n },\r\n \"isRotRutDeductible\": {\r\n \"type\": \"boolean\",\r\n \"nullable\": true\r\n },\r\n \"rotRutWorkType\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"rotRutDeductibleAmount\": {\r\n \"type\": \"number\",\r\n \"format\": \"double\"\r\n },\r\n \"rotRutItemType\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"autoCreateIssue\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if an order line of issue type will automatically be created after the order line of receipt type has been processed.\"\r\n },\r\n \"invoiceLineNumber\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The line number of the original invoice to be returned\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"invoiceNumber\": {\r\n \"type\": \"string\",\r\n \"description\": \"The reference number of the original invoice to be returned\",\r\n \"nullable\": true\r\n },\r\n \"invoiceType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The invoice type of the original invoice to be returned\",\r\n \"nullable\": true\r\n },\r\n \"kitAssembly\": {\r\n \"$ref\": \"#/components/schemas/KitAssemblyDto\"\r\n },\r\n \"customFields\": {\r\n \"$ref\": \"#/components/schemas/CustomFieldsDto\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderLineDtoPagedResult\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"value\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderLineDto\"\r\n },\r\n \"description\": \"Gets or sets the items that are paged\",\r\n \"nullable\": true\r\n },\r\n \"nextPage\": {\r\n \"type\": \"string\",\r\n \"description\": \"Gets or sets the link to the next page with more results. If set to null then no more records are present.\",\r\n \"nullable\": true\r\n },\r\n \"totalCount\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderLineInventoryDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n },\r\n \"baseUnit\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderListDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"_links\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"$ref\": \"#/components/schemas/DtoLink\"\r\n },\r\n \"description\": \"Links applicable for the dto\",\r\n \"nullable\": true\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of the order\",\r\n \"nullable\": true\r\n },\r\n \"orderId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The order id (a.k.a OrderCd) for the order\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"string\",\r\n \"description\": \"The current status of the order\",\r\n \"nullable\": true\r\n },\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"The order date\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"shippingScheduledDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date shipment is scheduled\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"customerId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer Id for the order (a.k.a CustoemrCd)\",\r\n \"nullable\": true\r\n },\r\n \"customerName\": {\r\n \"type\": \"string\",\r\n \"description\": \"The name of the customer as it appears on the order\",\r\n \"nullable\": true\r\n },\r\n \"orderQty\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total number of items on the order\",\r\n \"format\": \"double\"\r\n },\r\n \"orderTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total amount on the order\",\r\n \"format\": \"double\"\r\n },\r\n \"taxTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The tax total\",\r\n \"format\": \"double\"\r\n },\r\n \"currency\": {\r\n \"type\": \"string\",\r\n \"description\": \"The currency id for the order\",\r\n \"nullable\": true\r\n },\r\n \"location\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer location for this order\",\r\n \"nullable\": true\r\n },\r\n \"requestOn\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date the order is requested\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"customerOrder\": {\r\n \"type\": \"string\",\r\n \"description\": \"The customer order link\",\r\n \"nullable\": true\r\n },\r\n \"customerRefNo\": {\r\n \"type\": \"string\",\r\n \"description\": \"The order reference number of the customer\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"Any description on the order\",\r\n \"nullable\": true\r\n },\r\n \"lastModified\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date and time the order was last modified\",\r\n \"format\": \"date-time\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderListDtoPagedResult\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"value\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderListDto\"\r\n },\r\n \"description\": \"Gets or sets the items that are paged\",\r\n \"nullable\": true\r\n },\r\n \"nextPage\": {\r\n \"type\": \"string\",\r\n \"description\": \"Gets or sets the link to the next page with more results. If set to null then no more records are present.\",\r\n \"nullable\": true\r\n },\r\n \"totalCount\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Gets or sets the total number of items available. If set to null, then the total number of items cannot be determined\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderOriginDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"_links\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"$ref\": \"#/components/schemas/DtoLink\"\r\n },\r\n \"description\": \"Links applicable for the dto\",\r\n \"nullable\": true\r\n },\r\n \"orderType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The order type code for the origin order\",\r\n \"nullable\": true\r\n },\r\n \"orderId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique id of the origin order\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderPaymentDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"paymentMethod\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"cashAccountId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The cash account to use\",\r\n \"nullable\": true\r\n },\r\n \"paymentReference\": {\r\n \"type\": \"string\",\r\n \"description\": \"The payment reference\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderPrintDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"descriptionOnInvoice\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Set to true to print description on the invoice\",\r\n \"nullable\": true\r\n },\r\n \"noteOnInternalDocuments\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Set to true to print note on internal documents\",\r\n \"nullable\": true\r\n },\r\n \"noteOnExternalDocuments\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Set to true to print note on external documents\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderRotRutDistributionDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"lineId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Reference to the order line\",\r\n \"format\": \"int32\"\r\n },\r\n \"personalId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The personal id\",\r\n \"nullable\": true\r\n },\r\n \"amount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The amount\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"extra\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this is extra or not\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderRotRutDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"distributedAutomatically\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether the ROT/RUT is distributed automatically\"\r\n },\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of ROT/RUT\",\r\n \"nullable\": true\r\n },\r\n \"apartment\": {\r\n \"type\": \"string\",\r\n \"description\": \"The apartment reference\",\r\n \"nullable\": true\r\n },\r\n \"estate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The estate reference\",\r\n \"nullable\": true\r\n },\r\n \"organizationNumber\": {\r\n \"type\": \"string\",\r\n \"description\": \"The organization number\",\r\n \"nullable\": true\r\n },\r\n \"totalDeductableAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total amount that is tax deductable\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"otherCostAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"Cost amount for lines with inventory ROT/RUT item type OtherCost\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"materialCostAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"Cost amount for lines with inventory ROT/RUT item type Material\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"workPriceAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"Price amount for lines with inventory ROT/RUT item type Service\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"distributedAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total amount distributed among the specified personal IDs\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"distribution\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/SalesOrderRotRutDistributionDto\"\r\n },\r\n \"description\": \"The distrinbution entries\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderShipmentDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of the shipment\",\r\n \"nullable\": true\r\n },\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id of a shipments created for the order\",\r\n \"nullable\": true\r\n },\r\n \"date\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date of the shipment\",\r\n \"format\": \"date-time\"\r\n },\r\n \"quantity\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of goods on the shipment\",\r\n \"format\": \"double\"\r\n },\r\n \"weight\": {\r\n \"type\": \"number\",\r\n \"description\": \"The weight of the shipped goods\",\r\n \"format\": \"double\"\r\n },\r\n \"volume\": {\r\n \"type\": \"number\",\r\n \"description\": \"The volume of the shipped goods\",\r\n \"format\": \"double\"\r\n },\r\n \"invoiceType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of invoice\",\r\n \"nullable\": true\r\n },\r\n \"invoiceId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id of the invoice\",\r\n \"nullable\": true\r\n },\r\n \"inventoryDocumentType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of inventory document created for the shipment\",\r\n \"nullable\": true\r\n },\r\n \"inventoryReferenceId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id of the inventory document created for the shipment\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"string\",\r\n \"description\": \"The status of the shipment\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderShipmentDto specifies a shipment line detail for a sales order\"\r\n },\r\n \"SalesOrderShippingDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"contact\": {\r\n \"$ref\": \"#/components/schemas/ContactDto\"\r\n },\r\n \"address\": {\r\n \"$ref\": \"#/components/schemas/AddressDto\"\r\n },\r\n \"scheduledDate\": {\r\n \"type\": \"string\",\r\n \"description\": \"The shipping scheduled date\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T00:00:00+02:00'), the passed date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\",\r\n \"nullable\": true\r\n },\r\n \"shipSeparately\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this order can/is shipped separately\"\r\n },\r\n \"rule\": {\r\n \"type\": \"string\",\r\n \"description\": \"The shipping rule\",\r\n \"nullable\": true\r\n },\r\n \"preferredWarehouse\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"shipVia\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"fobPoint\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"terms\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"zone\": {\r\n \"$ref\": \"#/components/schemas/CdDescriptionPairDto\"\r\n },\r\n \"residentialDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this is residential delivery\"\r\n },\r\n \"saturdayDelivery\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this is a saturday delivery\"\r\n },\r\n \"insurance\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether insurance applies to this shipping\"\r\n },\r\n \"intrastatTransactionType\": {\r\n \"$ref\": \"#/components/schemas/IdDescriptionPairDto\"\r\n },\r\n \"priority\": {\r\n \"type\": \"integer\",\r\n \"description\": \"Priority of the order\",\r\n \"format\": \"int32\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderStatusDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The status code for the order\",\r\n \"nullable\": true\r\n },\r\n \"cancelled\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this order is in a cancelled state\"\r\n },\r\n \"hold\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Whether this order is in a held state\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderTaxDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"taxId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The unique tax identifier of the specific tax applied to the document\",\r\n \"nullable\": true\r\n },\r\n \"taxRate\": {\r\n \"type\": \"number\",\r\n \"description\": \"The tax rate used for the tax\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"taxableAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The calculated taxable amount for the specific tax\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"taxAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The calculated tax amount for the specific tax\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"exemptTax\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the taxable amount will be included in taxExemptTotal\"\r\n },\r\n \"includeInTaxable\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the taxable amount will be included in taxableTotal\"\r\n },\r\n \"isPendingTax\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the tax calculated is treated as a pending tax\"\r\n },\r\n \"isStatisticalTax\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the tax calculated is treated as a statistical tax\"\r\n },\r\n \"isReverseTax\": {\r\n \"type\": \"boolean\",\r\n \"description\": \"Indicates if the tax is treated as a reverse tax\"\r\n },\r\n \"taxType\": {\r\n \"type\": \"string\",\r\n \"description\": \"The type of tax, which can be Sales, Use, VAT or Withholding\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"The Visma.net.ERP.SalesOrders.Api.Dto.SalesOrder.SalesOrderTaxDto specifies a tax line detail for a sales order\"\r\n },\r\n \"SalesOrderTotalsDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"orderTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The order total\",\r\n \"format\": \"double\"\r\n },\r\n \"orderTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The order total in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"taxableTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The VAT taxable total\",\r\n \"format\": \"double\"\r\n },\r\n \"taxableTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The VAT taxable in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"taxExemptTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The VAT exempt total\",\r\n \"format\": \"double\"\r\n },\r\n \"taxExemptTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The VAT exempt total in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"taxTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The tax total\",\r\n \"format\": \"double\"\r\n },\r\n \"taxTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The tax total in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"discountTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The discount total\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"discountTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The discount total in base currency\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"costTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total of the costs on the lines of the sales order. How the `costTotal` is calculated is dependent on the option `useReplacementCostForMarginAndProfit`.\\r\\nIf this option is `true` the `costTotal` will be calculated based on the `replacementUnitCost`.\\r\\nIf this option is `false`, the `costTotal` will be calculate based on `unitCost`\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"costTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total of the costs on the lines of the sales order in base currency.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"freightCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight cost calculated for the sales order. Not applicable for transfer order types.\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"freightCostInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight cost calculated for the sales order in base currency. Not applicable for transfer order types.\",\r\n \"format\": \"double\",\r\n \"nullable\": true,\r\n \"readOnly\": true\r\n },\r\n \"freightTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight amount calculated in accordance with the shipping terms. Not applicable for transfer order types.\",\r\n \"format\": \"double\"\r\n },\r\n \"freightTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The freight amount calculated in accordance with the shipping terms in base currency. Not applicable for transfer order types.\",\r\n \"format\": \"double\"\r\n },\r\n \"unbilledAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The sum of unbilled amounts for the lines\",\r\n \"format\": \"double\"\r\n },\r\n \"unbilledAmountInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The sum of unbilled amounts for the lines in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"unshippedAmount\": {\r\n \"type\": \"number\",\r\n \"description\": \"The sum of unshipped amounts for the lines\",\r\n \"format\": \"double\"\r\n },\r\n \"unshippedAmountInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The sum of unshipped amounts for the lines in base currency\",\r\n \"format\": \"double\"\r\n },\r\n \"paymentTotal\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total amount of payments connected to the order in the order currency\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"paymentTotalInBaseCurrency\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total amount of payments connected to the order in the base currency\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SalesOrderValidationProblemDetails\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"type\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"title\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"status\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\",\r\n \"nullable\": true\r\n },\r\n \"detail\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"instance\": {\r\n \"type\": \"string\",\r\n \"nullable\": true\r\n },\r\n \"errors\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n },\r\n \"nullable\": true\r\n },\r\n \"details\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/ValidationErrorCodeDetails\"\r\n },\r\n \"description\": \"List with details for all the validation problems\",\r\n \"nullable\": true,\r\n \"readOnly\": true\r\n }\r\n },\r\n \"additionalProperties\": {},\r\n \"description\": \"Defines an error response for validation problems\"\r\n },\r\n \"SalesPersonDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"SupplierDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"id\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id of the supplier selected for the order line\",\r\n \"nullable\": true\r\n },\r\n \"name\": {\r\n \"type\": \"string\",\r\n \"description\": \"The name of the supplier selected for the order line\",\r\n \"nullable\": true\r\n },\r\n \"currencyId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The currency of the supplier selected for the order line\",\r\n \"nullable\": true\r\n },\r\n \"price\": {\r\n \"type\": \"number\",\r\n \"description\": \"The supplier price of the supplier selected for the order line\",\r\n \"format\": \"double\"\r\n }\r\n },\r\n \"additionalProperties\": false\r\n },\r\n \"ValidationErrorCodeDetails\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"code\": {\r\n \"type\": \"string\",\r\n \"description\": \"Error code\",\r\n \"nullable\": true,\r\n \"example\": \"0001-NullNotAllowed\"\r\n },\r\n \"message\": {\r\n \"type\": \"string\",\r\n \"description\": \"Detailed validation message\",\r\n \"nullable\": true,\r\n \"example\": \"Null value not allowed\"\r\n },\r\n \"parameters\": {\r\n \"type\": \"object\",\r\n \"additionalProperties\": {},\r\n \"description\": \"Extra parameters related to the validation problem.\\r\\nIf the validation problem refers to a particular field the \\\"property\\\" element will contain the field name\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Defines details related to validation problems\"\r\n },\r\n \"WarehouseAvailabilityDto\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"internalWarehouseId\": {\r\n \"type\": \"integer\",\r\n \"description\": \"The internal id used by the system for the warehouse\",\r\n \"format\": \"int32\"\r\n },\r\n \"warehouseId\": {\r\n \"type\": \"string\",\r\n \"description\": \"The id (SiteCd) of the warehouse\",\r\n \"nullable\": true\r\n },\r\n \"description\": {\r\n \"type\": \"string\",\r\n \"description\": \"The description of the warehouse\",\r\n \"nullable\": true\r\n },\r\n \"quantityOnHand\": {\r\n \"type\": \"number\",\r\n \"description\": \"Physical quantity on-hand of items in the specific warehouse\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityAvailable\": {\r\n \"type\": \"number\",\r\n \"description\": \"You can configure the way this estimated quantity is calculated by using availability\\r\\ncalculation rules. The available quantity may include anticipated transactions and therefore\\r\\nmay be less than or greater than the QuantityOnHand. Anticipated transactions correspond\\r\\nto the documents and transactions that have been entered in the system but not yet\\r\\nprocessed to the end.\\r\\nIn the availability calculation settings of an item class, you specify which anticipated\\r\\ntransactions affect the available quantity. Thus, the available quantity may include\\r\\ngoods on purchase orders and exclude the goods allocated for sales orders. You can use\\r\\nthe available quantity as an indicator of demand\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityAvailableForShipment\": {\r\n \"type\": \"number\",\r\n \"description\": \"Estimated quantity calculated by using the following formula: the QuantityOnHand minus the quantity on unreleased inventory\\r\\nissues, minus the quantity allocated for shipping. Thus, the QuantityAvailableForShipment can be less than the QuantityOnHand\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityNotAvailable\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity stored at locations not included in the availability calculation.\\r\\nFor each warehouse location, the 'Include in Qty. Available' check box on the\\r\\nWarehouses(IN204000) screen defines whether the quantity of items stored at this\\r\\nlocation is included in the quantity of available items.\",\r\n \"format\": \"double\"\r\n },\r\n \"quantityPurchaseOrders\": {\r\n \"type\": \"number\",\r\n \"description\": \"The quantity of the inventory item included in open purchase orders.\",\r\n \"format\": \"double\"\r\n },\r\n \"estimatedUnitCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The estimated cost per unit, calculated as EstimatedTotalCost/QuantityOnHand\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"estimatedTotalCost\": {\r\n \"type\": \"number\",\r\n \"description\": \"The total cost for the QuantityOnHand\",\r\n \"format\": \"double\",\r\n \"nullable\": true\r\n },\r\n \"lastModified\": {\r\n \"type\": \"string\",\r\n \"description\": \"The date and time the entry for this warehouse was modified\\r\\nUnless a specific time zone offset is included (e.g. '2012-12-24T12:15:14+02:00'), the date is considered to be in the UTC time zone.\",\r\n \"format\": \"date-time\"\r\n },\r\n \"locations\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/LocationAvailabilityDto\"\r\n },\r\n \"description\": \"List of locations in the warehouse for the specific inventory item.\\r\\nNote that this is not returned as part of the response unless expand=Location is specified with the request.\",\r\n \"nullable\": true\r\n },\r\n \"lotSerials\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/components/schemas/LotSerialAvailabilityDto\"\r\n },\r\n \"description\": \"LOT/Serial information\",\r\n \"nullable\": true\r\n }\r\n },\r\n \"additionalProperties\": false,\r\n \"description\": \"Warehouse information for a specific inventory item\"\r\n }\r\n },\r\n \"securitySchemes\": {\r\n \"oauth2\": {\r\n \"type\": \"oauth2\",\r\n \"description\": \"\",\r\n \"flows\": {\r\n \"clientCredentials\": {\r\n \"tokenUrl\": \"https://connect.visma.com/connect/token\",\r\n \"scopes\": {\r\n \"visma.net.erp.salesorder:read\": \"Read sales order data\",\r\n \"visma.net.erp.salesorder:write\": \"Create or update sales order data\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"x-visma-erp-error-codes\": [\r\n {\r\n \"code\": \"0001-NullNotAllowed\",\r\n \"description\": \"Null value not allowed\"\r\n },\r\n {\r\n \"code\": \"0001-EmptyNotAllowed\",\r\n \"description\": \"Empty value not allowed\"\r\n },\r\n {\r\n \"code\": \"0002-InvalidLength\",\r\n \"description\": \"Invalid length\"\r\n },\r\n {\r\n \"code\": \"0003-InvalidValue\",\r\n \"description\": \"Invalid value\"\r\n },\r\n {\r\n \"code\": \"0004-ValueNotAllowed\",\r\n \"description\": \"Value not allowed\"\r\n },\r\n {\r\n \"code\": \"0005-InvalidState\",\r\n \"description\": \"Invalid state\"\r\n },\r\n {\r\n \"code\": \"0006-FunctionalityNotImplemented\",\r\n \"description\": \"Functionality not implemented\"\r\n },\r\n {\r\n \"code\": \"0008-FeatureNotActive\",\r\n \"description\": \"Feature is not active\"\r\n },\r\n {\r\n \"code\": \"0100-OutsideValidRange\",\r\n \"description\": \"Value is outside the valid range\"\r\n },\r\n {\r\n \"code\": \"0200-LineIdDoesNotExist\",\r\n \"description\": \" Line Id {0}. Line with provided Id does not exists in the order\"\r\n },\r\n {\r\n \"code\": \"1100-InvalidDiscount\",\r\n \"description\": \"Document/Group discount cannot exceed the line total\"\r\n },\r\n {\r\n \"code\": \"1101-DiscountAmountMoreThanExtPrice\",\r\n \"description\": \"Discount amount can not be greater than Extended Price\"\r\n },\r\n {\r\n \"code\": \"1102-DiscountSetupInvalid\",\r\n \"description\": \"Discount setup is not valid for discounts calculations\"\r\n },\r\n {\r\n \"code\": \"1103-DiscountNotApplicable\",\r\n \"description\": \"Discount can not be applied to line\"\r\n },\r\n {\r\n \"code\": \"1104-FreeItemNotFound\",\r\n \"description\": \"Free item specified in header discount was not found.\"\r\n },\r\n {\r\n \"code\": \"1105-InvalidDiscountCode\",\r\n \"description\": \"Invalid DiscountCode. The Discount is missing or invalid\"\r\n },\r\n {\r\n \"code\": \"1200-SubaccountSegmentInactive\",\r\n \"description\": \"Subaccount segment values inactive\"\r\n },\r\n {\r\n \"code\": \"1201-SubaccountInactive\",\r\n \"description\": \"Subaccount is not Active\"\r\n },\r\n {\r\n \"code\": \"1202-SegmentValueNotFound\",\r\n \"description\": \"Segment value for Subaccount cannot be found\"\r\n },\r\n {\r\n \"code\": \"1203-SubaccountNotFound\",\r\n \"description\": \"Could not find Subaccount segment value\"\r\n },\r\n {\r\n \"code\": \"1204-SubaccountError\",\r\n \"description\": \"Validation errors for the subaccount\"\r\n },\r\n {\r\n \"code\": \"1300-InvalidShipComplete\",\r\n \"description\": \"If require location and not require shipping then ship complete cannot be set to back order allowed\"\r\n },\r\n {\r\n \"code\": \"1310-FreightCostCanNotBeSetManually\",\r\n \"description\": \"Freight cost is not allowed to be set manually according to the Ship Via Code settings\"\r\n },\r\n {\r\n \"code\": \"1400-CustomerLookupException\",\r\n \"description\": \"Exception searching customer\"\r\n },\r\n {\r\n \"code\": \"1401-MissingTermsId\",\r\n \"description\": \"TermsId cannot be empty in the order. Set a default terms on the customer or specify the terms for the order\"\r\n },\r\n {\r\n \"code\": \"1402-PaymentMethodIdNotFound\",\r\n \"description\": \"Payment method set for order can not be found\"\r\n },\r\n {\r\n \"code\": \"1403-InactivePaymentMethodId\",\r\n \"description\": \"Payment methods set for order is inactive\"\r\n },\r\n {\r\n \"code\": \"1404-InvalidPaymentMethodId\",\r\n \"description\": \"Payment method set for order can not be used in sales orders\"\r\n },\r\n {\r\n \"code\": \"1405-PaymentReferenceRequired\",\r\n \"description\": \"Payment reference not set, order type requires it\"\r\n },\r\n {\r\n \"code\": \"1406-PaymentReferenceProhibited\",\r\n \"description\": \"Order type does not allow payment reference\"\r\n },\r\n {\r\n \"code\": \"1407-InvalidCustomerStatus\",\r\n \"description\": \"Invalid Customer Status\"\r\n },\r\n {\r\n \"code\": \"1408-OverrideCurrencyIdProhibited\",\r\n \"description\": \"Currency Id can not be overridden\"\r\n },\r\n {\r\n \"code\": \"1409-PaymentMethodRequired\",\r\n \"description\": \"Payment method not set, order type requires it\"\r\n },\r\n {\r\n \"code\": \"1500-CashAccountRequired\",\r\n \"description\": \"Cash account not set, order type requires it\"\r\n },\r\n {\r\n \"code\": \"1501-CashAccountInactive\",\r\n \"description\": \"Cash account set for order is inactive\"\r\n },\r\n {\r\n \"code\": \"1502-CashAccountNotFound\",\r\n \"description\": \"Cash account set on order can not be found\"\r\n },\r\n {\r\n \"code\": \"1503-CashAccountInvalidForPaymentMethod\",\r\n \"description\": \"Cash account cannot be used with the set Payment Method\"\r\n },\r\n {\r\n \"code\": \"1504-CashAccountInvalidForBranch\",\r\n \"description\": \"Cash account not allowed to be used with the set Branch\"\r\n },\r\n {\r\n \"code\": \"1600-FinancialPeriodNotFound\",\r\n \"description\": \"No financial period that matches the selected Invoice date can be found. Please change the Invoice Date, set the Financial period for the order or create Financial periods\"\r\n },\r\n {\r\n \"code\": \"1601-FinancialPeriodClosed\",\r\n \"description\": \"Financial period '{0}' is closed and cannot be set for order\"\r\n },\r\n {\r\n \"code\": \"1602-FinancialPeriodInactive\",\r\n \"description\": \"Financial period is inactive. Activate it or set another period\"\r\n },\r\n {\r\n \"code\": \"1603-FinancialPeriodNotApplicable\",\r\n \"description\": \"Post period cannot be set for this order type\"\r\n },\r\n {\r\n \"code\": \"1700-WarehouseLocationNotFound\",\r\n \"description\": \"Warehouse location is not found\"\r\n },\r\n {\r\n \"code\": \"1701-WarehouseLocationInactive\",\r\n \"description\": \"Warehouse location is inactive\"\r\n },\r\n {\r\n \"code\": \"1703-WarehouseLocationInvalid\",\r\n \"description\": \"Sales not allowed for warehouse location set for line\"\r\n },\r\n {\r\n \"code\": \"1704-InvalidOrderType\",\r\n \"description\": \"Not possible to update warehouse for line with line number {0}. Setting warehouse location is allowed only for not shippable orders.\"\r\n },\r\n {\r\n \"code\": \"1705-DuplicatedSiteCds\",\r\n \"description\": \"Duplicated site cds\"\r\n },\r\n {\r\n \"code\": \"1800-InvalidLineOperation\",\r\n \"description\": \"Given line operation is not accepted for this order type\"\r\n },\r\n {\r\n \"code\": \"1801-MissingReasonCode\",\r\n \"description\": \"Reason code is not set and order type requires it\"\r\n },\r\n {\r\n \"code\": \"1802-InvalidWarehouseId\",\r\n \"description\": \"Invalid Warehouse Id, or Warehouse Id not found\"\r\n },\r\n {\r\n \"code\": \"1803-UniqueInventoryIdNotFound\",\r\n \"description\": \"Cannot find unique InventoryId for inventoryId: '{0}'\"\r\n },\r\n {\r\n \"code\": \"1804-InventoryIdNotFound\",\r\n \"description\": \"InventoryId cannot be found or is invalid\"\r\n },\r\n {\r\n \"code\": \"1805-InvalidTaxCategoryId\",\r\n \"description\": \"Invalid TaxCategoryId, or TaxCategory not found\"\r\n },\r\n {\r\n \"code\": \"1806-InvalidSalesAccountId\",\r\n \"description\": \"Invalid SalesAccountId specified\"\r\n },\r\n {\r\n \"code\": \"1807-InvalidReasonCode\",\r\n \"description\": \"Invalid ReasonCode, or ReasonCode not found\"\r\n },\r\n {\r\n \"code\": \"1808-InvalidUnitOfMeasure\",\r\n \"description\": \"Invalid Unit of Measure\"\r\n },\r\n {\r\n \"code\": \"1809-InvalidQuantityForType\",\r\n \"description\": \"Quantity must be zero or positive when inventory item is not of type MiscCharge\"\r\n },\r\n {\r\n \"code\": \"1810-LineAlreadyCompleted\",\r\n \"description\": \"Line is marked as completed. Patch operation can not be done on completed lines.\"\r\n },\r\n {\r\n \"code\": \"1811-LineAlreadyShippedExternalLink\",\r\n \"description\": \"Not possible to update External Link. Update only accepted for orders, where the updated line has not been shipped\"\r\n },\r\n {\r\n \"code\": \"1812-LineAlreadyShippedSalesAccountId\",\r\n \"description\": \"Not possible to update sales account id. Update only accepted for orders, where the updated line has not been shipped\"\r\n },\r\n {\r\n \"code\": \"1813-InputLinesExceedExistingLinesCount\",\r\n \"description\": \"The number of provided lines exceed existing sales order lines\"\r\n },\r\n {\r\n \"code\": \"1814-ReasonCodePrerequisitesNotMet\",\r\n \"description\": \"The reason code prerequisites for the line does not meet expectations\"\r\n },\r\n {\r\n \"code\": \"1816-SortOrderNbrIsNotUnique\",\r\n \"description\": \"The SortOrder number provided is not unique in your request\"\r\n },\r\n {\r\n \"code\": \"1817-LineIdIsNotUnique\",\r\n \"description\": \"The LineId provided is not unique in your request\"\r\n },\r\n {\r\n \"code\": \"1818-LineAlreadyShippedUnitCost\",\r\n \"description\": \"Not possible to update Unit cost. Update only accepted for orders, where the updated line has not been shipped\"\r\n },\r\n {\r\n \"code\": \"1819-LineAlreadyShippedShippingRule\",\r\n \"description\": \"Not possible to update Shipping rule. Update only accepted for orders, where the updated line has not been shipped\"\r\n },\r\n {\r\n \"code\": \"1820-LineIsFreeItem\",\r\n \"description\": \"Cannot change discount fields for line that is marked as free item line\"\r\n },\r\n {\r\n \"code\": \"1821-InventoryIdFreeItemNotFound\",\r\n \"description\": \"InventoryId for a free Item cannot be found or is invalid\"\r\n },\r\n {\r\n \"code\": \"1822-CanNotUpdateLineLocation\",\r\n \"description\": \"Not possible to update warehouse for line with line number {0}. Update only accepted for orders in statuses Open, On hold, Back ordered, Credit hold and where the updated line has not been shipped and line is not completed.\"\r\n },\r\n {\r\n \"code\": \"1823-DeleteLineWhichIsAlreadyShipped\",\r\n \"description\": \"Cannot delete line that has been shipped\"\r\n },\r\n {\r\n \"code\": \"1824-DeleteLineWhichIsFreeDiscountLine\",\r\n \"description\": \"Cannot delete free item line set from a discount. Please review the discount\"\r\n },\r\n {\r\n \"code\": \"1825-DeleteSalesOrderWithShippedLines\",\r\n \"description\": \"Cannot delete order containing lines that have been shipped\"\r\n },\r\n {\r\n \"code\": \"1826-InvalidInvoice\",\r\n \"description\": \"Invoice not found for the customer\"\r\n },\r\n {\r\n \"code\": \"1827-InvalidInvoiceLine\",\r\n \"description\": \"Invoice line not found\"\r\n },\r\n {\r\n \"code\": \"1828-InvalidOrderTypeForInvoice\",\r\n \"description\": \"Invoice information for line can only be added for return orders\"\r\n },\r\n {\r\n \"code\": \"1829-InvalidOrderTypeForInvoice\",\r\n \"description\": \"Quantity set to be returned is greater than the invoiced quantity\"\r\n },\r\n {\r\n \"code\": \"1900-OrderNumberSequenceNotFound\",\r\n \"description\": \"Order number sequence cannot be found\"\r\n },\r\n {\r\n \"code\": \"1901-InactiveSalesPerson\",\r\n \"description\": \"Sales Person is not active\"\r\n },\r\n {\r\n \"code\": \"1902-SalesPersonNotFound\",\r\n \"description\": \"Sales Person is not found\"\r\n },\r\n {\r\n \"code\": \"1903-SupplierNotFound\",\r\n \"description\": \"Supplier not found or is not active\"\r\n },\r\n {\r\n \"code\": \"1904-ProjectNotFound\",\r\n \"description\": \"Project cannot be found\"\r\n },\r\n {\r\n \"code\": \"1905-ProjectNotVisibleInSO\",\r\n \"description\": \"Project is not accepted for use in a sales order\"\r\n },\r\n {\r\n \"code\": \"1906-ProjectCancelled\",\r\n \"description\": \"Project cannot be set because status is Cancelled\"\r\n },\r\n {\r\n \"code\": \"1907-ProjectCompleted\",\r\n \"description\": \"Project cannot be set because status is Completed\"\r\n },\r\n {\r\n \"code\": \"1908-ProjectTaskNotFound\",\r\n \"description\": \"Project task cannot be found\"\r\n },\r\n {\r\n \"code\": \"1920-RotRutNotSupportedByOrderType\",\r\n \"description\": \"Cannot set ROT/RUT deductible as order type does not support it\"\r\n },\r\n {\r\n \"code\": \"1921-RotRutNotActivatedForCompany\",\r\n \"description\": \"Cannot set ROT/RUT deductible as ROT/RUT is not activated for the company.\"\r\n },\r\n {\r\n \"code\": \"1922-RotRutNotInBaseCurrency\",\r\n \"description\": \" ROT/RUT deductible order needs to be in the base currency\"\r\n },\r\n {\r\n \"code\": \"1923-NonRotRutOrder\",\r\n \"description\": \"Order is not set to ROT/RUT deductible\"\r\n },\r\n {\r\n \"code\": \"1924-InvalidLinesRotRutType\",\r\n \"description\": \"Order lines ROT or RUT does not match orders ROT or RUT selection\"\r\n },\r\n {\r\n \"code\": \"1925-InvalidRotArguments\",\r\n \"description\": \"Provide either Apartment and Organization number, or only Estate\"\r\n },\r\n {\r\n \"code\": \"5000-InvalidAttributeFilter\",\r\n \"description\": \"Invalid attributeFilter\"\r\n },\r\n {\r\n \"code\": \"5001-InvalidAttributeName\",\r\n \"description\": \"The attribute name is invalid. Only characters, digits, or space is allowed\"\r\n },\r\n {\r\n \"code\": \"5002-BaseUnitDetailsNotSet\",\r\n \"description\": \"Base Unit details not set for unit\"\r\n }\r\n ]\r\n },\r\n \"security\": [\r\n {\r\n \"oauth2\": []\r\n }\r\n ]\r\n}", "url": "https://salesorder.visma.net/swagger/v3/swagger.json", "output": null, "newLineBehavior": "Auto" @@ -14,7 +14,9 @@ "clientBaseClass": null, "configurationClass": null, "generateClientClasses": true, + "suppressClientClassesOutput": false, "generateClientInterfaces": false, + "suppressClientInterfacesOutput": false, "clientBaseInterface": null, "injectHttpClient": false, "disposeHttpClient": true, @@ -32,6 +34,8 @@ "exposeJsonSerializerSettings": false, "clientClassAccessModifier": "public", "typeAccessModifier": "public", + "propertySetterAccessModifier": "", + "generateNativeRecords": false, "generateContractsOutput": true, "contractsNamespace": "Visma.Net.SalesOrderNG.Models", "contractsOutputFilePath": "Models/Contracts.cs", @@ -88,9 +92,6 @@ "generateOptionalPropertiesAsNullable": false, "generateNullableReferenceTypes": false, "templateDirectory": null, - "typeNameGeneratorType": null, - "propertyNameGeneratorType": null, - "enumNameGeneratorType": null, "serviceHost": null, "serviceSchemes": null, "output": "ClientSalesOrderV3.cs", diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index 04dc2d5..6e69f6e 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -4,7 +4,7 @@ Visma.net Copyright © ON IT AS 2014 - 2020 Copyright © ON IT AS 2014 - 2021 - 4.2.1.22 + 4.2.1.24 netstandard2.0;net462;net6 Visma.net Copyright © ON IT AS 2014 - 2022 @@ -25,8 +25,8 @@ LICENSE.md on_it_logo.png README.md - 4.2.1.22 - 4.2.1.22 + 4.2.1.24 + 4.2.1.24 $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage @@ -37,7 +37,7 @@ - + From 8fa00e11748e8775933859129921f46544792fba Mon Sep 17 00:00:00 2001 From: Anders Yderborg Date: Thu, 6 Mar 2025 13:16:23 +0100 Subject: [PATCH 37/37] Make exchange rate nullable --- Visma.net/Models/JournalTransaction.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Visma.net/Models/JournalTransaction.cs b/Visma.net/Models/JournalTransaction.cs index 298b143..0fa078d 100644 --- a/Visma.net/Models/JournalTransaction.cs +++ b/Visma.net/Models/JournalTransaction.cs @@ -94,9 +94,9 @@ public string description public string errorInfo { get; private set; } [JsonProperty] - public decimal exchangeRate + public decimal? exchangeRate { - get => Get(); + get => Get(); set => Set(value); }