Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

orbcorp/orb-csharp

Open more actions menu

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 = "example-customer@withorb.com", 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

  •  
  •  
Morty Proxy This is a proxified and sanitized view of the page, visit original site.