-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #818 from recurly/add-revrec-settings-to-plans
[V2] Add RevRec settings to the Plan entity
- Loading branch information
Showing
6 changed files
with
119 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.Xml; | ||
|
||
namespace Recurly | ||
{ | ||
public abstract class RevRecEntity : RecurlyEntity | ||
{ | ||
public string LiabilityGlAccountId = ""; | ||
public string RevenueGlAccountId = ""; | ||
public string PerformanceObligationId { get; set; } | ||
|
||
internal protected void ReadRevRecNode(XmlTextReader reader) | ||
{ | ||
switch (reader.Name) | ||
{ | ||
case "liability_gl_account_id": | ||
LiabilityGlAccountId = reader.ReadElementContentAsString(); | ||
break; | ||
|
||
case "revenue_gl_account_id": | ||
RevenueGlAccountId = reader.ReadElementContentAsString(); | ||
break; | ||
|
||
case "performance_obligation_id": | ||
PerformanceObligationId = reader.ReadElementContentAsString(); | ||
break; | ||
}; | ||
} | ||
|
||
internal protected void WriteRevRecNodes(XmlTextWriter writer) | ||
{ | ||
writer.WriteValidStringOrNil("liability_gl_account_id", LiabilityGlAccountId); | ||
writer.WriteValidStringOrNil("revenue_gl_account_id", RevenueGlAccountId); | ||
writer.WriteStringIfValid("performance_obligation_id", PerformanceObligationId); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters