Skip to content

orbcorp/orb-csharp

Repository files navigation

Orb C# API Library

The Orb C# SDK provides convenient access to the Orb REST API from applications written in C#.

The REST API documentation can be found on docs.withorb.com.

Installation

Dotnet

dotnet add reference /path/to/orb-csharp/src/Orb/

Usage

See the examples directory for complete and runnable examples.

using Customers = Orb.Models.Customers;
using Orb = Orb;
using System = System;

// Configured using the ORB_API_KEY, ORB_WEBHOOK_SECRET and ORB_BASE_URL environment variables
Orb::OrbClient client = new Orb::OrbClient();

var param = new Customers::CustomerCreateParams()
{
  Email = "[email protected]", Name = "My Customer"
};

var customer = await client.Customers.Create(param);

System::Console.WriteLine(customer);

Client Configuration

Configure the client using environment variables:

using Orb = Orb;

// Configured using the ORB_API_KEY, ORB_WEBHOOK_SECRET and ORB_BASE_URL environment variables
Orb::OrbClient client = new Orb::OrbClient();

Or manually:

using Orb = Orb;

Orb::OrbClient client = new Orb::OrbClient()
{
  APIKey = "My API Key"
};

Alternatively, you can use a combination of the two approaches.

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •