Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V2] Add RevRec settings to the Plan entity #818

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

Smolations
Copy link

@Smolations Smolations commented Feb 1, 2024

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

  • LiabilityGlAccountId
  • RevenueGlAccountId
  • PerformanceObligationId
  • SetupFeeLiabilityGlAccountId
  • SetupFeeRevenueGlAccountId
  • SetupFeePerformanceObligationId

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();

@Smolations Smolations added the V2 V2 Client label Feb 1, 2024
default revrec settings
- adds setup fee revrec settings manually
@Smolations Smolations changed the title Adds RevRec settings to the Plan entity [V2] Adds RevRec settings to the Plan entity Feb 2, 2024
@Smolations Smolations mentioned this pull request Feb 2, 2024
@Smolations Smolations changed the title [V2] Adds RevRec settings to the Plan entity [V2] Add RevRec settings to the Plan entity Feb 2, 2024
@Smolations Smolations marked this pull request as ready for review February 2, 2024 20:46
@@ -5,7 +5,7 @@

namespace Recurly
{
public class Plan : RecurlyEntity
public class Plan : RevRecEntity
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this changing? Is there still a RecurlyEntity being used?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if you look at the thing taking its place, RevRecEntity, you will see that it is inheriting from RecurlyEntity, so the new class is just fitted "in between" the original two.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohhh okay. Cool. That makes sense.

@8eth
Copy link

8eth commented Feb 6, 2024

DevQA+1

@8eth 8eth merged commit 4990e0b into add-revrec-features Feb 6, 2024
6 checks passed
@8eth 8eth deleted the add-revrec-settings-to-plans branch February 6, 2024 19:49
recurly-integrations pushed a commit that referenced this pull request Mar 13, 2024
[Full Changelog](1.17.34...2.0.0)

**Merged Pull Requests**

- [V2] Add RevRec Settings to Adjustments [#822](#822) ([Smolations](https://github.com/Smolations))
- [V2] Adds RevRec features to AddOns [#821](#821) ([Smolations](https://github.com/Smolations))
- [V2] Adds RevRec features to Item, GiftCard, and ShippingMethod [#819](#819) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec settings to the Plan entity [#818](#818) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec settings to business entities [#817](#817) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec Performance Obligations Feature [#816](#816) ([Smolations](https://github.com/Smolations))
- Add revrec features [#815](#815) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec General Ledger Accounts Feature [#813](#813) ([Smolations](https://github.com/Smolations))
recurly-integrations pushed a commit that referenced this pull request Mar 13, 2024
[Full Changelog](1.17.34...1.17.35)

**Merged Pull Requests**

- [V2] Add RevRec Settings to Adjustments [#822](#822) ([Smolations](https://github.com/Smolations))
- [V2] Adds RevRec features to AddOns [#821](#821) ([Smolations](https://github.com/Smolations))
- [V2] Adds RevRec features to Item, GiftCard, and ShippingMethod [#819](#819) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec settings to the Plan entity [#818](#818) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec settings to business entities [#817](#817) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec Performance Obligations Feature [#816](#816) ([Smolations](https://github.com/Smolations))
- Add revrec features [#815](#815) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec General Ledger Accounts Feature [#813](#813) ([Smolations](https://github.com/Smolations))
recurly-integrations pushed a commit that referenced this pull request Mar 13, 2024
[Full Changelog](1.17.34...1.17.36)

**Merged Pull Requests**

- [V2] Add RevRec Settings to Adjustments [#822](#822) ([Smolations](https://github.com/Smolations))
- [V2] Adds RevRec features to AddOns [#821](#821) ([Smolations](https://github.com/Smolations))
- [V2] Adds RevRec features to Item, GiftCard, and ShippingMethod [#819](#819) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec settings to the Plan entity [#818](#818) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec settings to business entities [#817](#817) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec Performance Obligations Feature [#816](#816) ([Smolations](https://github.com/Smolations))
- Add revrec features [#815](#815) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec General Ledger Accounts Feature [#813](#813) ([Smolations](https://github.com/Smolations))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V2 V2 Client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants