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 settings to the Plan entity #818

Closed Smolations closed 8 months ago

Smolations commented 9 months ago

Adds the following properties to the Plan entity for the V2 client:

Examples

The following examples only show the base fee RevRec settings for brevity, but the SetupFee* properties behave the same way.

## create a plan with default RevRec settings
var plan = new Plan();
# ...
plan.Create();
Console.WriteLine("Liability ID: {0}", plan.LiabilityGlAccountId); # => ""
Console.WriteLine("Revenue ID: {0}", plan.RevenueGlAccountId);     # => ""
Console.WriteLine("POB ID: {0}", plan.PerformanceObligationId);    # => "abc" (default POB)

## remove RevRec settings from a plan
var plan = Plans.Get(planCode);

# note that POB IDs cannot be removed, but they can be changed
plan.LiabilityGlAccountId = null;
plan.RevenueGlAccountId = null;
plan.Update();
8eth commented 8 months ago

DevQA+1