Skip to content

Latest commit

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Chip C# library

Frameworks supported

  • .NET Core >=2.1
  • .NET Framework >=4.6
  • Mono/Xamarin >=vNext

Dependencies

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

Installation

Download generated binary

  1. Download DLL.zip from Releases
  2. Include the DLL (under the bin folder) in the C# project.

Generate DLL

  1. Generate the DLL using your preferred tool (e.g. dotnet build)
  2. Include the DLL (under the bin folder) in the C# project

Include on project

  1. Clone/Download this repository
  2. Include project to .sln
  3. Add as Project References on your project dependencies

Usage

Getting Started

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);}}}}

Example

Check our examples here.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages