Skip to content

Georotzen/recurly-client-net

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Recurly .NET Client

This project is currently in Beta. The majority of the Recurly API v2 objects are supported, however there may be a few that are still in progress. Please report any questions or issues via Github.

The Official .NET Recurly API client library.

Compatible with .NET >=3.5 and Recurly API v2.

Installation

If you use NuGet, simply run the following:

PM> Install-Package recurly-api-client

You may also visit our Releases page to download the latest version. Then add the Recurly.dll as a reference to your solution.

Alternatively, you can use use git to work with the latest changes in development.

git clone git://github.com/recurly/recurly-client-net.git C:\path\to\recurly

For more information about getting started with git, please check out the Github Guide for Windows.

Configuration

Specify your API Key, site subdomain, and (optionally) page size setting in your app.config or web.config file:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="recurly" type="Recurly.Configuration.Section,Recurly"/>
  </configSections>

  <recurly
    apiKey="123456789012345678901234567890ab"
    subdomain="company"
	pageSize="50" /> <!-- optional. 50 is the default -->

</configuration>

Client Documentation

Full C# API documentation available here.

Example usage

To create an account with account code and name:

var account = new Account("123")
{
	FirstName = "John",
	LastName = "Smith"
}
account.Create();

Get the account with account code 123:

var account = Accounts.Get("123");

List all available Accounts and print their account codes:

var accounts = Accounts.List();
foreach (var account in accounts)
	Console.WriteLine(account.AccountCode);

Get an account's billing information:

var account = Accounts.Get("123");
var info = account.BillingInfo;

Create a coupon with code WINTER, name, and with a 10% discount:

var coupon = new Coupon("WINTER", "Winter discount", 10);
coupon.Create();

Redeem that coupon on an account that uses US dollars, getting a CouponRedemption object:

var redemption = account.RedeemCoupon("WINTER", "USD");

Each section of the API (Accounts, Invoices, Transactions, etc.) has static references for getting or listing their types and concrete implementations for manipulating concrete objects.

Recurly API Documentation

Please see the Recurly API for more information.

Support

Looking for help? Please contact support@recurly.com or visit support.recurly.com.

Stackoverflow is also a great place to talk to the community and find answers to common questions.

Announcements

For the latest API and client library announcements follow Recurly on Twitter and join our Google Group:

About

A .NET API wrapper for Recurly. Super Simple Subscription billing.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%