diff --git a/Acumatica REST API Client.sln b/Acumatica REST API Client.sln index c072cba1..56ad56de 100644 --- a/Acumatica REST API Client.sln +++ b/Acumatica REST API Client.sln @@ -1,14 +1,10 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29503.13 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Acumatica REST API Example Console Application", "Acumatica REST API Console Application\Acumatica REST API Example Console Application.csproj", "{201508E8-B057-4EFB-AD9D-74C777339C42}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Acumatica.RESTClient", "Acumatica.RESTClient\Acumatica.RESTClient.csproj", "{25008D3F-3D78-4BB9-B14B-0A792AE97892}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SOAPLikeWrapperForREST", "SOAPLikeWrapperForREST\SOAPLikeWrapperForREST.csproj", "{99541823-473A-46E8-AEC0-CE6250F00FE8}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Endpoints", "Endpoints", "{F0B2BD45-79AE-43AF-B737-3018CD95C6E3}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Acumatica.DeviceHub_19.200.001", "Acumatica.DeviceHub_19.200.001\Acumatica.DeviceHub_19.200.001.csproj", "{638D4F3F-4496-44DC-8BAA-6C0F05516A22}" @@ -33,18 +29,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {201508E8-B057-4EFB-AD9D-74C777339C42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {201508E8-B057-4EFB-AD9D-74C777339C42}.Debug|Any CPU.Build.0 = Debug|Any CPU - {201508E8-B057-4EFB-AD9D-74C777339C42}.Release|Any CPU.ActiveCfg = Release|Any CPU - {201508E8-B057-4EFB-AD9D-74C777339C42}.Release|Any CPU.Build.0 = Release|Any CPU {25008D3F-3D78-4BB9-B14B-0A792AE97892}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {25008D3F-3D78-4BB9-B14B-0A792AE97892}.Debug|Any CPU.Build.0 = Debug|Any CPU {25008D3F-3D78-4BB9-B14B-0A792AE97892}.Release|Any CPU.ActiveCfg = Release|Any CPU {25008D3F-3D78-4BB9-B14B-0A792AE97892}.Release|Any CPU.Build.0 = Release|Any CPU - {99541823-473A-46E8-AEC0-CE6250F00FE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {99541823-473A-46E8-AEC0-CE6250F00FE8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {99541823-473A-46E8-AEC0-CE6250F00FE8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {99541823-473A-46E8-AEC0-CE6250F00FE8}.Release|Any CPU.Build.0 = Release|Any CPU {638D4F3F-4496-44DC-8BAA-6C0F05516A22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {638D4F3F-4496-44DC-8BAA-6C0F05516A22}.Debug|Any CPU.Build.0 = Debug|Any CPU {638D4F3F-4496-44DC-8BAA-6C0F05516A22}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/Acumatica REST API Console Application/Acumatica REST API Example Console Application.csproj b/Acumatica REST API Console Application/Acumatica REST API Example Console Application.csproj index 7ad3931d..dfbf99a8 100644 --- a/Acumatica REST API Console Application/Acumatica REST API Example Console Application.csproj +++ b/Acumatica REST API Console Application/Acumatica REST API Example Console Application.csproj @@ -33,10 +33,51 @@ 4 - + + ..\packages\Acumatica.RESTClient.1.1.0\lib\net48\Acumatica.RESTClient.dll + + + ..\packages\DefaultEndpoint_20.200.001.1.0.0\lib\net48\DefaultEndpoint_20.200.001.dll + + + ..\packages\JsonSubTypes.1.8.0\lib\net47\JsonSubTypes.dll + + + ..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll + + + ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll + + + ..\packages\RestSharp.107.1.1\lib\netstandard2.0\RestSharp.dll + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + - + + ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll + + + ..\packages\System.Text.Encodings.Web.5.0.0\lib\net461\System.Text.Encodings.Web.dll + + + ..\packages\System.Text.Json.5.0.0\lib\net461\System.Text.Json.dll + + + ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + + ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll + @@ -53,20 +94,9 @@ + - - {b26a386b-f5da-4679-acba-1541251b696b} - Acumatica.Default_18.200.001 - - - {cf6f7377-7a11-4d88-ad4d-6440e6994826} - Acumatica.Default_20.200.001 - - - {25008d3f-3d78-4bb9-b14b-0a792ae97892} - Acumatica.RESTClient - {99541823-473a-46e8-aec0-ce6250f00fe8} SOAPLikeWrapperForREST diff --git a/Acumatica REST API Console Application/App.config b/Acumatica REST API Console Application/App.config index dc4d0406..8e8a0951 100644 --- a/Acumatica REST API Console Application/App.config +++ b/Acumatica REST API Console Application/App.config @@ -9,6 +9,10 @@ + + + + diff --git a/Acumatica REST API Console Application/Program.cs b/Acumatica REST API Console Application/Program.cs index 7ccba5ed..37205092 100644 --- a/Acumatica REST API Console Application/Program.cs +++ b/Acumatica REST API Console Application/Program.cs @@ -1,6 +1,6 @@ using Acumatica.Auth.Api; using Acumatica.Auth.Model; -using Acumatica.Default_18_200_001.Api; +using Acumatica.Default_20_200_001.Api; using Acumatica.RESTClient.Client; using System; using System.Collections.Generic; diff --git a/Acumatica REST API Console Application/RESTExample.cs b/Acumatica REST API Console Application/RESTExample.cs index 4334d998..6867a558 100644 --- a/Acumatica REST API Console Application/RESTExample.cs +++ b/Acumatica REST API Console Application/RESTExample.cs @@ -1,7 +1,7 @@ using Acumatica.Auth.Api; using Acumatica.Auth.Model; -using Acumatica.Default_18_200_001.Api; -using Acumatica.Default_18_200_001.Model; +using Acumatica.Default_20_200_001.Api; +using Acumatica.Default_20_200_001.Model; using Acumatica.RESTClient.Client; using RestSharp; using System; diff --git a/Acumatica REST API Console Application/SOAPLikeExample.cs b/Acumatica REST API Console Application/SOAPLikeExample.cs index 2facd2ab..7fce4596 100644 --- a/Acumatica REST API Console Application/SOAPLikeExample.cs +++ b/Acumatica REST API Console Application/SOAPLikeExample.cs @@ -1,4 +1,4 @@ -using Acumatica.Default_18_200_001.Model; +using Acumatica.Default_20_200_001.Model; using SOAPLikeWrapperForREST; using System; @@ -8,7 +8,7 @@ public class SOAPLikeExample { public static void ExampleMethod(string siteURL, string username, string password, string tenant = null, string branch = null, string locale = null) { - var restClient = new SOAPLikeClient(siteURL, "/Default/18.200.001"); + var restClient = new SOAPLikeClient(siteURL, "/Default/20.200.001"); try { diff --git a/Acumatica.RESTClient/packages.config b/Acumatica REST API Console Application/packages.config similarity index 84% rename from Acumatica.RESTClient/packages.config rename to Acumatica REST API Console Application/packages.config index 7486adb5..2eaa873e 100644 --- a/Acumatica.RESTClient/packages.config +++ b/Acumatica REST API Console Application/packages.config @@ -1,8 +1,10 @@  - + + + - + diff --git a/Acumatica.RESTClient/Acumatica.RESTClient.csproj b/Acumatica.RESTClient/Acumatica.RESTClient.csproj index 096b8f7d..ce209cdc 100644 --- a/Acumatica.RESTClient/Acumatica.RESTClient.csproj +++ b/Acumatica.RESTClient/Acumatica.RESTClient.csproj @@ -1,139 +1,54 @@ - - + + - Debug - AnyCPU - {25008D3F-3D78-4BB9-B14B-0A792AE97892} - Library - Properties - Acumatica.RESTClient - Acumatica.RESTClient - v4.8 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + netstandard2.0 + images\AcumaticaRESTClientLogo.ico + 2.0.0 + Acumatica + A simple client allowing to use Acuamtica REST API from C#. Based on OpenAPI spec version: 3, base code Generated by: https://github.com/openapitools/openapi-generator.git + Acumatica + https://github.com/Acumatica/AcumaticaRESTAPIClientForCSharp + AcumaticaRESTClientLogo.png + README.md + https://github.com/Acumatica/AcumaticaRESTAPIClientForCSharp + Acumatica;REST;client; + Changed .Net version to .Net Standard 2.0 + GPL-3.0-only + + + + + + + + + + + - - ..\packages\JsonSubTypes.1.8.0\lib\net47\JsonSubTypes.dll - - - ..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll - - - ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll - - - ..\packages\RestSharp.107.1.1\lib\netstandard2.0\RestSharp.dll - - - - ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll - - - - ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll - - - - - ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll - - - ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll - - - ..\packages\System.Text.Encodings.Web.5.0.0\lib\net461\System.Text.Encodings.Web.dll - - - ..\packages\System.Text.Json.5.0.0\lib\net461\System.Text.Json.dll - - - ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll - - - ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll - - - - - - - - - + + True + \ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - + + True + \ + + + True + \ + - - - \ No newline at end of file + + diff --git a/Acumatica.RESTClient/Acumatica.RESTClient.nuspec b/Acumatica.RESTClient/Acumatica.RESTClient.nuspec deleted file mode 100644 index 8cc46b2b..00000000 --- a/Acumatica.RESTClient/Acumatica.RESTClient.nuspec +++ /dev/null @@ -1,16 +0,0 @@ - - - - $id$ - $version$ - $title$ - Dmitrii-Naumov - $author$ - https://github.com/Acumatica/AcumaticaRESTAPIClientForCSharp - false - A simple client allowing to use Acuamtica REST API from C#. Based on OpenAPI spec version: 3, base code Generated by: https://github.com/openapitools/openapi-generator.git - Copyright 2021 - Acumatica REST - GPL-3.0-only - - \ No newline at end of file diff --git a/Acumatica.RESTClient/images/AcumaticaRESTClientLogo.png b/Acumatica.RESTClient/AcumaticaRESTClientLogo.png similarity index 100% rename from Acumatica.RESTClient/images/AcumaticaRESTClientLogo.png rename to Acumatica.RESTClient/AcumaticaRESTClientLogo.png diff --git a/Acumatica.RESTClient/BaseApi/BaseApi.cs b/Acumatica.RESTClient/BaseApi/BaseApi.cs index c910d4d4..5fe44f9f 100644 --- a/Acumatica.RESTClient/BaseApi/BaseApi.cs +++ b/Acumatica.RESTClient/BaseApi/BaseApi.cs @@ -178,7 +178,7 @@ protected ApiResponse DeserializeResponse(RestResponse response) return new ApiResponse(localVarStatusCode, GetHeadersExceptCookies(response), - (T)this.Configuration.ApiClient.Deserialize(response, typeof(T))); + (T)this.Configuration.ApiClient.Deserialize(response)); } protected ApiResponse GetResponseHeaders(RestResponse response) diff --git a/Acumatica.RESTClient/Client/ApiClient.cs b/Acumatica.RESTClient/Client/ApiClient.cs index 4cfc810f..be6db8a1 100644 --- a/Acumatica.RESTClient/Client/ApiClient.cs +++ b/Acumatica.RESTClient/Client/ApiClient.cs @@ -152,16 +152,16 @@ public string ParameterToString(object obj) /// The HTTP response. /// Object type. /// Object representation of the JSON string. - public object Deserialize(RestResponse response, Type type) + public object Deserialize(RestResponse response) { IReadOnlyCollection headers = response.Headers; - if (type == typeof(byte[])) // return byte array + if (typeof(T) == typeof(byte[])) // return byte array { return response.RawBytes; } // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) - if (type == typeof(Stream)) + if (typeof(T) == typeof(Stream)) { if (headers != null) { @@ -184,20 +184,25 @@ public object Deserialize(RestResponse response, Type type) return stream; } - if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object + if (typeof(T).Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object { return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); } - if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type + if (typeof(T) == typeof(String)) // return primitive type { - return ConvertType(response.Content, type); + return (String)response.Content; + } + + if (typeof(T).Name.StartsWith("System.Nullable")) + { + return Convert.ChangeType(response.Content, typeof(T)); } // at this point, it must be a model (json) try { - return JsonConvert.DeserializeObject(response.Content, type, serializerSettings); + return JsonConvert.DeserializeObject(response.Content, typeof(T), serializerSettings); } catch (Exception e) { @@ -287,16 +292,6 @@ public static string Base64Encode(string text) return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); } - /// - /// Dynamically cast the object into target type. - /// - /// Object to be casted - /// Target type - /// Casted object - public static dynamic ConvertType(dynamic fromObject, Type toObject) - { - return Convert.ChangeType(fromObject, toObject); - } /// /// Convert stream to byte array diff --git a/Acumatica.RESTClient/Model/Credentials.cs b/Acumatica.RESTClient/Model/Credentials.cs index 9ae2e332..ae7f25ee 100644 --- a/Acumatica.RESTClient/Model/Credentials.cs +++ b/Acumatica.RESTClient/Model/Credentials.cs @@ -8,19 +8,11 @@ * Generated by: https://github.com/swagger-api/swagger-codegen.git */ +using Newtonsoft.Json; using System; -using System.Linq; using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Acumatica.RESTClient.Client.OpenAPIDateConverter; +using System.Text; namespace Acumatica.Auth.Model { @@ -28,7 +20,7 @@ namespace Acumatica.Auth.Model /// Credentials /// [DataContract] - public partial class Credentials : IEquatable, IValidatableObject + public partial class Credentials : IEquatable { /// /// Initializes a new instance of the class. @@ -210,16 +202,6 @@ public override int GetHashCode() return hashCode; } } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/Acumatica.RESTClient/Model/Endpoint.cs b/Acumatica.RESTClient/Model/Endpoint.cs index d19f406f..c002ff9b 100644 --- a/Acumatica.RESTClient/Model/Endpoint.cs +++ b/Acumatica.RESTClient/Model/Endpoint.cs @@ -8,19 +8,10 @@ * Generated by: https://github.com/swagger-api/swagger-codegen.git */ +using Newtonsoft.Json; using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Acumatica.RESTClient.Client.OpenAPIDateConverter; +using System.Text; namespace Acumatica.Auth.Model { @@ -28,7 +19,7 @@ namespace Acumatica.Auth.Model /// Endpoint /// [DataContract] - public partial class Endpoint : IEquatable, IValidatableObject + public partial class Endpoint : IEquatable { /// /// Initializes a new instance of the class. @@ -141,16 +132,6 @@ public override int GetHashCode() return hashCode; } } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/Acumatica.RESTClient/Model/FileLink.cs b/Acumatica.RESTClient/Model/FileLink.cs index f0d48893..37b68ae3 100644 --- a/Acumatica.RESTClient/Model/FileLink.cs +++ b/Acumatica.RESTClient/Model/FileLink.cs @@ -8,19 +8,10 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +using Newtonsoft.Json; using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Acumatica.RESTClient.Client.OpenAPIDateConverter; +using System.Text; namespace Acumatica.RESTClient.Model { @@ -28,7 +19,7 @@ namespace Acumatica.RESTClient.Model /// FileLink /// [DataContract] - public partial class FileLink : IEquatable, IValidatableObject + public partial class FileLink : IEquatable { /// /// Initializes a new instance of the class. @@ -141,16 +132,6 @@ public override int GetHashCode() return hashCode; } } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/Acumatica.RESTClient/Model/HttpError.cs b/Acumatica.RESTClient/Model/HttpError.cs index 234c90b5..6a80602a 100644 --- a/Acumatica.RESTClient/Model/HttpError.cs +++ b/Acumatica.RESTClient/Model/HttpError.cs @@ -8,19 +8,12 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ +using Newtonsoft.Json; using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; using System.Collections.Generic; -using System.Collections.ObjectModel; +using System.Linq; using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Acumatica.RESTClient.Client.OpenAPIDateConverter; +using System.Text; namespace Acumatica.RESTClient.Model { @@ -28,7 +21,7 @@ namespace Acumatica.RESTClient.Model /// HttpError /// [DataContract] - public partial class HttpError : Dictionary, IEquatable, IValidatableObject + public partial class HttpError : Dictionary, IEquatable { /// /// Initializes a new instance of the class. @@ -190,16 +183,6 @@ public override int GetHashCode() return hashCode; } } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/Acumatica.RESTClient/Model/Version.cs b/Acumatica.RESTClient/Model/Version.cs index 8f6df197..26add8e2 100644 --- a/Acumatica.RESTClient/Model/Version.cs +++ b/Acumatica.RESTClient/Model/Version.cs @@ -8,19 +8,11 @@ * Generated by: https://github.com/swagger-api/swagger-codegen.git */ +using Newtonsoft.Json; using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Acumatica.RESTClient.Client.OpenAPIDateConverter; +using System.Text; namespace Acumatica.Auth.Model { @@ -28,7 +20,7 @@ namespace Acumatica.Auth.Model /// Version /// [DataContract] - public partial class Version : IEquatable, IValidatableObject + public partial class Version : IEquatable { /// /// Initializes a new instance of the class. @@ -141,16 +133,6 @@ public override int GetHashCode() return hashCode; } } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/Acumatica.RESTClient/Model/VersionAndEndpoints.cs b/Acumatica.RESTClient/Model/VersionAndEndpoints.cs index f6c3c31a..407e2513 100644 --- a/Acumatica.RESTClient/Model/VersionAndEndpoints.cs +++ b/Acumatica.RESTClient/Model/VersionAndEndpoints.cs @@ -8,19 +8,12 @@ * Generated by: https://github.com/swagger-api/swagger-codegen.git */ +using Newtonsoft.Json; using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; using System.Collections.Generic; -using System.Collections.ObjectModel; +using System.Linq; using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Acumatica.RESTClient.Client.OpenAPIDateConverter; +using System.Text; namespace Acumatica.Auth.Model { @@ -28,7 +21,7 @@ namespace Acumatica.Auth.Model /// VersionAndEndpoints /// [DataContract] - public partial class VersionAndEndpoints : IEquatable, IValidatableObject + public partial class VersionAndEndpoints : IEquatable { /// /// Initializes a new instance of the class. @@ -125,16 +118,6 @@ public override int GetHashCode() return hashCode; } } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } } } diff --git a/Acumatica.RESTClient/Properties/AssemblyInfo.cs b/Acumatica.RESTClient/Properties/AssemblyInfo.cs deleted file mode 100644 index ac0a07bf..00000000 --- a/Acumatica.RESTClient/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Acumatica REST Client")] -[assembly: AssemblyDescription("A simple client allowing to use Acuamtica REST API from C#. Based on OpenAPI spec version: 3, base code Generated by: https://github.com/openapitools/openapi-generator.git")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Acumatica")] -[assembly: AssemblyProduct("AcumaticaRESTClient")] -[assembly: AssemblyCopyright("© 2021")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0")] -[assembly: AssemblyFileVersion("1.0.0")] -[assembly: Guid("34BCEA8E-F207-46EF-A498-0E07E3BB5D3E")] diff --git a/Acumatica.RESTClient/app.config b/Acumatica.RESTClient/app.config deleted file mode 100644 index 648690a7..00000000 --- a/Acumatica.RESTClient/app.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/Acumatica.RESTClient/images/AcumaticaRESTClientLogo.ico b/Acumatica.RESTClient/images/AcumaticaRESTClientLogo.ico new file mode 100644 index 00000000..582a6ebf Binary files /dev/null and b/Acumatica.RESTClient/images/AcumaticaRESTClientLogo.ico differ diff --git a/Example Console Application.sln b/Example Console Application.sln new file mode 100644 index 00000000..c62d1687 --- /dev/null +++ b/Example Console Application.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Acumatica REST API Example Console Application", "Acumatica REST API Console Application\Acumatica REST API Example Console Application.csproj", "{201508E8-B057-4EFB-AD9D-74C777339C42}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SOAPLikeWrapperForREST", "SOAPLikeWrapperForREST\SOAPLikeWrapperForREST.csproj", "{99541823-473A-46E8-AEC0-CE6250F00FE8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {201508E8-B057-4EFB-AD9D-74C777339C42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {201508E8-B057-4EFB-AD9D-74C777339C42}.Debug|Any CPU.Build.0 = Debug|Any CPU + {201508E8-B057-4EFB-AD9D-74C777339C42}.Release|Any CPU.ActiveCfg = Release|Any CPU + {201508E8-B057-4EFB-AD9D-74C777339C42}.Release|Any CPU.Build.0 = Release|Any CPU + {99541823-473A-46E8-AEC0-CE6250F00FE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {99541823-473A-46E8-AEC0-CE6250F00FE8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {99541823-473A-46E8-AEC0-CE6250F00FE8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {99541823-473A-46E8-AEC0-CE6250F00FE8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DA26CA7D-E30F-41BF-A06B-44407CC5F0F6} + EndGlobalSection +EndGlobal diff --git a/README.md b/README.md index ae4a9caf..8eb23e5a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ -# AcumaticaRESTAPIClientForCSharp -Acumatica REST API Client for C# +# Acumatica REST API Client for C# + +[![NuGet](https://buildstats.info/nuget/Acumatica.RESTClient)](https://www.nuget.org/packages/Acumatica.RESTClient/) The solution allows to easily start developing REST API based integration with Acumatica ERP. diff --git a/SOAPLikeWrapperForREST.sln b/SOAPLikeWrapperForREST.sln new file mode 100644 index 00000000..c607a279 --- /dev/null +++ b/SOAPLikeWrapperForREST.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SOAPLikeWrapperForREST", "SOAPLikeWrapperForREST\SOAPLikeWrapperForREST.csproj", "{99541823-473A-46E8-AEC0-CE6250F00FE8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {99541823-473A-46E8-AEC0-CE6250F00FE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {99541823-473A-46E8-AEC0-CE6250F00FE8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {99541823-473A-46E8-AEC0-CE6250F00FE8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {99541823-473A-46E8-AEC0-CE6250F00FE8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {2F920B22-A300-4B3C-836F-F7D28D6906E8} + EndGlobalSection +EndGlobal