- .NET Core >=2.1
- .NET Framework >=4.6
- Mono/Xamarin >=vNext
- RestSharp - 106.11.4 or later
- Json.NET - 12.0.3 or later
- JsonSubTypes - 1.7.0 or later
- System.ComponentModel.Annotations - 4.7.0 or later
- BouncyCastle - 1.8.1 or later
The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:
Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
Install-Package System.ComponentModel.Annotations
Install-Package BouncyCastle
NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742
- Download
DLL.zipfrom Releases - Include the DLL (under the
binfolder) in the C# project.
- Generate the DLL using your preferred tool (e.g.
dotnet build) - Include the DLL (under the
binfolder) in the C# project
- Clone/Download this repository
- Include project to
.sln - Add as
Project Referenceson your project dependencies
usingSystem.Collections.Generic;usingSystem.Diagnostics;usingOrg.Chip.Api;usingOrg.Chip.Client;usingOrg.Chip.Model;namespaceExample{publicclassExample{publicstaticvoidMain(){Configurationconfig=newConfiguration();config.BasePath="https://gate.chip-in.asia/api/v1/";config.AccessToken="Ys1hUYPruZyMQc_eXrSrMmRFxJpbccPvOiV0Oglk2VOM3eosCkZvHh6IIJRzyaII0PL2jp6ZbzFkxaSastfUpg==";varapiInstance=newPurchasesApi(config);varclient=newClientDetails("asd@asd.com");varproducts=newList<Product>();products.Add(newProduct("Test","1",100));vardetails=newPurchaseDetails(products:products);vardata=newPurchase(client,details,brandId:newSystem.Guid("a0da394b-0e3c-4002-956f-e02b47341db6"));try{Purchaseresult=apiInstance.PurchasesCreate(data);Debug.WriteLine(result);}catch(ApiExceptione){Debug.Print("Exception when calling PurchasesApi.PurchasesCreate: "+e.Message);Debug.Print("Status Code: "+e.ErrorCode);Debug.Print(e.StackTrace);}}}}Check our examples here.