diff --git a/Visma.net/Models/Supplier.cs b/Visma.net/Models/Supplier.cs index 56c5489..67f61fd 100644 --- a/Visma.net/Models/Supplier.cs +++ b/Visma.net/Models/Supplier.cs @@ -68,8 +68,8 @@ public string corporateId public CreditTerms creditTerms { - get => Get("creditTermsId", new CreditTerms("30")); - set => Set(value); + get => Get("creditTermsId", new CreditTerms()); + set => Set(value, "creditTermsId"); } public string currencyId @@ -88,7 +88,8 @@ public string documentLanguage [JsonProperty] public JObject extras { get; private set; } - public SupplierGLAccountDto glAccounts { + public SupplierGLAccountDto glAccounts + { get => Get(); set => Set(value); } diff --git a/Visma.net/Visma.net.csproj b/Visma.net/Visma.net.csproj index 0f4ca14..a5969ae 100644 --- a/Visma.net/Visma.net.csproj +++ b/Visma.net/Visma.net.csproj @@ -5,6 +5,7 @@ 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 @@ -29,6 +30,9 @@ 4.2.1.11 $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage + 4.0.3.11 + 4.0.3.11 + diff --git a/Visma.net/lib/VismaNetApiHelper.cs b/Visma.net/lib/VismaNetApiHelper.cs index c3500f0..54eba62 100644 --- a/Visma.net/lib/VismaNetApiHelper.cs +++ b/Visma.net/lib/VismaNetApiHelper.cs @@ -579,6 +579,7 @@ internal static async Task GetTokenOAuth(string clientId, string secret, return data["token"].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