The Rebilly NET SDK makes it easy for developers to access Rebilly REST APIs from their .NET code.
There are three ways to download and install the Rebilly NET SDK.
- From the Package Manager Console.
Install-Package Rebilly.dll -Pre
-
Searching for 'Rebilly' using the Package Manager Dialog.
-
Build from the source
- Clone the Rebilly .NET SDK Repo:
git clone https://github.com/Rebilly/Rebilly-NET-SDK.git
or download it here:
https://github.com/Rebilly/Rebilly-NET-SDK/archive/master.zip
- Locate Rebilly.sln and open in Visual Studio 2013+.
- It should build without any dependencies.
- .NET Framework 4.5+
Create a Rebilly Client
using Rebilly;
// Ceate a Rebilly client.
var RebillyClient = new Client(apiKey: "YOUR API Key", baseUrl: Client.SandboxHost);
Create a Customer
var RebillyClient = new Client(apiKey: "YOUR API Key", baseUrl: Client.SandboxHost);
var CreateCustomer = new Customer()
{
Email = "[email protected]",
FirstName = "Bill",
LastName = "Smith",
IpAddress = "123.123.133.133"
};
try
{
var NewCustomer = RebillyClient.Customers().Create(CreateCustomer);
}
catch(RebillyException ex)
{
Console.WriteLine("An error has occurred: " + ex.ToString());
}
Creating a signature on the server, which can be used for client-side authentication
using Rebilly;
var NewSignature = new Signature();
var SignatureText = NewSignature.Generate("[Your API User]", "[Your API Key]");
Read https://www.rebilly.com/api/documentation/ for more details.