recurly / recurly-client-dotnet

A .NET API wrapper for Recurly.
https://developers.recurly.com
MIT License
86 stars 80 forks source link

[V2] Add RevRec General Ledger Accounts Feature #813

Closed Smolations closed 9 months ago

Smolations commented 9 months ago

This change creates the GeneralLedgerAccount entity for the V2 client, the primary entity concerning the new (and upcoming) RevRec API features.

Examples

// creating: (account type can be Liability or Revenue)
var gla = new GeneralLedgerAccount("my accounting code", GeneralLedgerAccountType.Revenue);
gla.Create();

// getting:
var glaJustCreated = GeneralLedgerAccounts.Get(gla.Id);

// updating: (can also update the Code, but _not_ the AccountType)
gla.Description = "This is a new description";
gla.Update();

// listing:
var glas = GeneralLedgerAccounts.List();

// in addition to FilterCriteria, can also filter by account type:
var glas = GeneralLedgerAccounts.List(GeneralLedgerAccountType.Liability);
8eth commented 9 months ago

devQA + 1 (tests passing)